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

bccdb
 z
 dfdeed
 aab
 y
 abac

a = sorted(list(raw_input()))
b = sorted(list(raw_input()))
n = len(a)
mini = 0
maxi = n-1
s = ""
i = 0
while i < n:
    if b[maxi] > a[mini]:
        if i % 2 == 0:
            s += a[mini]
            mini += 1
        else :
            s += b[maxi]
            maxi -= 1
    else :
        r = n - i
        l = ""
        if i % 2 == 0:
            s1 = (r+1)/2
            s2 = r/2
            v1 = a[mini:mini+s1]
            v2 = b[maxi-s2+1:maxi+1][::-1]
            for i in xrange(1, s2+1):
                l += v1[-i]
                l += v2[-i]
            if s1 != s2:
                l += v1[0]
            l = l[::-1]
        else :
            s1 = r/2
            s2 = (r+1)/2
            v1 = a[mini:mini+s1]
            v2 = b[maxi-s2+1:maxi+1][::-1]
            for i in xrange(1, s1+1):
                l += v2[-i]
                l += v1[-i]
            if s1 != s2:
                l += v2[0]
            l = l[::-1]
        s += l
        i = n
        
    i += 1
print s
        