bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

import heapq

S = raw_input()
T = raw_input()
N = len(S)

SL = []
TL = []

for i in xrange(N):
    heapq.heappush(SL, (ord(S[i]), S[i]))
    heapq.heappush(TL, (-ord(T[i]), T[i]))

solve = ['?'] * N
start = 0
finish = N - 1

for i in xrange(N):
    if i % 2 == 0:
        (w1, c1) = heapq.heappop(SL)
        (w2, c2) = TL[0]
        if w1 <= -w2:
            solve[start] = c1
            start += 1
        else:
            OST = N - i - 1
            countJ = 0
            for j in xrange(N):
                if solve[-j] == '?':
                    countJ += 1
                if countJ == OST:
                    solve[-j] = c1
                    break
    else:
        (w1, c1) = heapq.heappop(TL)
        (w2, c2) = SL[0]
        if -w1 >= w2:
            solve[start] = c1
            start += 1
        else:
            OST = N - i
            countJ = 0
            for j in xrange(N):
                if solve[-j] == '?':
                    countJ += 1
                if countJ == OST:
                    solve[-j] = c1
                    break
    
print ''.join(solve)

