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

bccdb
 z
 dfdeed
 aab
 y
 abac

s1 = input().strip()

O = [0]*26

for znak in s1:
    c = (ord(znak) - 97) % 26
    O[c] += 1

s2 = input().strip()

I = [0]*26
for znak in s2:
    c = (ord(znak) - 97) % 26
    I[c] += 1

dolzinaO = len(s1)//2
if len(s1) % 2 == 1:
    dolzinaO += 1

dolzinaI = len(s1)//2


accO = 0
i = 0
while accO <= dolzinaO:
    if accO + O[i] >= dolzinaO:
        O[i] -= accO + O[i] - dolzinaO
        accO = dolzinaO
        for j in range(i+1, 26):
            O[j] = 0
        break
    else:
        accO += O[i]
        i += 1

accI = 0
i = 25
while accI <= dolzinaI:
    if accI + I[i] >= dolzinaI:
        I[i] -= accI + I[i] - dolzinaI
        accI = dolzinaI
        for j in range(i):
            I[j] = 0
        break
    else:
        accI += I[i]
        i -= 1

RESITEV = [None]*len(s1)
zacetni = 0
koncni = len(s1) - 1
cnt = len(s1)

mo = 0
while O[mo] == 0:
    mo += 1

Mo = 25
while O[Mo] == 0:
    Mo -= 1

mi = 0
while I[mi] == 0:
    mi += 1

MI = 25
while I[MI] == 0:
    MI -= 1

na_potezi = True

while cnt > 0:
    if na_potezi: #OLEG NA POTEZI
        if MI < mo:
            RESITEV[koncni] = Mo
            O[Mo] -= 1
            while Mo >= 0 and O[Mo] == 0:
                Mo -= 1
            na_potezi = not na_potezi
            cnt -= 1
            koncni -= 1
        else:
            RESITEV[zacetni] = mo
            O[mo] -= 1
            while mo < 26 and O[mo] == 0:
                mo += 1
            na_potezi = not na_potezi
            cnt -= 1
            zacetni += 1
    else:
        if MI < mo:
            RESITEV[koncni] = mi
            I[mi] -= 1
            while mi < 26 and I[mi] == 0:
                mi += 1
            na_potezi = not na_potezi
            cnt -= 1
            koncni -= 1
        else:
            RESITEV[zacetni] = MI
            I[MI] -= 1
            while MI >= 0 and I[MI] == 0:
                MI -= 1
            na_potezi = not na_potezi
            cnt -= 1
            zacetni += 1

prava = []
for e in RESITEV:
    prava.append(chr(e + 97))

print(''.join(prava))
            













    
    

