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

bccdb
 z
 dfdeed
 aab
 y
 abac

s1=list(input())
s2=list(input())
n=len(s1)
s1.sort()
s2.sort()
s2.reverse()
s1=s1[:(n+1)//2]
s2=s2[:(n+1)//2]
print(s1)
print(s2)
ans1,ans2="",""
for i in range(n):
    print(ans1,ans2,s1,s2)
    if i % 2==1:
        if s1[0]>=s2[0]:
            ans2+=s2[-1]
            del(s2[-1])
        else:
            ans1+=s2[0]
            del(s2[0])
    else:
        if s1[0]>=s2[0]:
            ans2+=s1[-1]
            del(s1[-1])
        else:
            ans1+=s1[0]
            del(s1[0])
print(ans1+ans2[::-1])

