def getImax(k): imax = 0 for i in range(k): if b[i] > b[imax]: imax = i return imax a = list(map(int, input().split())) b = list(map(int, input().split())) n = len(a) m = len(b) na = n nb = m imax = getImax(nb) for i in range(m): if a[na - 1] <= __________: b[imax] = b[nb - 1] nb = nb - 1 if nb > 0: imax = getImax(nb) else: na = na - 1 while nb > 0: i = 0 j = na - 1 imax = getImax(nb) while i <= j: mean = (i + j) // 2 if a[mean] < b[imax]: i = mean + 1 else: j = mean - 1 for k in range(na - 1, i - 1, -1): __________ a[i + nb - 1] = b[imax] b[imax] = b[nb - 1] __________ nb = nb - 1 print(a)