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

bccdb
 z
 dfdeed
 aab
 y
 abac

from sys import *
f = lambda: sorted(stdin.readline()[:-1])
a, b = f(), f()
n = len(a)
u = v = ''
i, j = 0, -1
d = (n + 1) // 2 - 1
while n:
    if a[i] < b[j]:
        u += a[i]
        i += 1
    else: v += a[i + d]
    n -= 1
    if not n: break
    elif a[i] < b[j]:
        u += b[j]
        j -= 1
    else: v += b[j - d]
    n -= 1
    d -= 1
print(u + v[::-1])