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

bccdb
 z
 dfdeed
 aab
 y
 abac

a = input()
b = input()
a_count = [a.count(chr(ord('a') + x)) for x in range(26)]
b_count = [b.count(chr(ord('a') + x)) for x in range(26)]
length = len(a)
result = length * ['a']

left = 0
right = length - 1
i = 0
while i < length:
    mi, ma = 0, 25
    while a_count[mi] == 0:
        mi = mi + 1
    while b_count[ma] == 0:
        ma = ma - 1
    if i % 2 == 0:  # Alice 
        if mi < ma:
            result[left] = chr(ord('a')+mi)
            left = left + 1
        else:
            togo = (length - i - 1) // 2
            while a_count[mi] <= togo:
                togo = togo - a_count[mi]
                mi = mi + 1
            result[right] = chr(ord('a')+mi)
            right = right - 1
    else:
        if mi < ma:
            result[left] = chr(ord('a')+ma)
            left = left + 1
        else:
            togo = (length - i - 1) // 2
            while b_count[ma] <= togo:
                togo = togo - b_count[ma]
                ma = ma - 1
            result[right] = chr(ord('a')+ma)
            right = right - 1
    i = i + 1
print(''.join(result))
