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

bccdb
 z
 dfdeed
 aab
 y
 abac

oleg = sorted(input())
igor = sorted(input())[::-1]

length = len(oleg)

l=[]
r=[]

for i in range(length):
    if i%2==0:
        if oleg[0] > igor[0]:
            r=[oleg[-1]]+r
            del oleg[-1]
        else:
            l=l+[oleg[0]]
            del oleg[0]
    else:
        if oleg[0] > igor[0]:
            r=[igor[-1]]+r
            del igor[-1]
        else:
            l=l+[igor[0]]
            del igor[0]

print(''.join(l+r))
