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

bccdb
 z
 dfdeed
 aab
 y
 abac

a=list(input())
b=list(input())
y=len(a)
l=int(y//2)+y%2
r=y-l+y%2
a.sort()
b.sort()
al=a[:l]
br=b[r:]
t=["?"]*y
wq=0
wp=y-1
i=0
while "?" in t:
    if i%2==0:
        if t.count("?")==1:
            t[t.index("?")]=al[0]
        elif min(al)>=max(br):
            t[wp]=max(al)
            al.remove(max(al))
            wp-=1
        else:
            t[wq]=min(al)
            al.remove(min(al))
            wq+=1
    else:
        if t.count("?")==1:
            t[t.index("?")]=br[0]
        elif min(al)>=max(br):
            t[wp]=min(br)
            b.remove(min(br))
            wp-=1
        else:
            t[wq]=max(b)
            b.remove(max(b))
            wq+=1
    i+=1
print("".join(t))

