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

bccdb
 z
 dfdeed
 aab
 y
 abac

s = list(input())
t = list(input())
n = len(s)

ss = list(sorted([c for c in s]))[:(n + 1) // 2]
ds = {}
for c in ss:
    if c in ds:
        ds[c] += 1
    else:
        ds[c] = 1
ss = list(sorted(set(ss)))

st = list(reversed(sorted([c for c in t])))[:n // 2]
dt = {}
for c in st:
    if c in dt:
        dt[c] += 1
    else:
        dt[c] = 1
st = list(reversed(sorted(set(st))))

ans = ['?' for _ in range(n)]
hi = 0
ti = -1
for i in range(n):
    if i % 2 == 0:
        if 0 < len(st) and st[-1] < ss[0]:
            cs = ss[-1]
            ans[ti] = cs
            ti -= 1
        else:
            cs = ss[0]
            ans[hi] = cs
            hi += 1
        if ds[cs] == 1:
            del ds[cs]
            if cs == ss[0]:
                ss = ss[1:]
            else:
                ss = ss[:-1]
        else:
            ds[cs] -= 1
    else:
        if 0 < len(ss) and st[0] < ss[-1]:
            ct = st[-1]
            ans[ti] = ct
            ti -= 1
        else:
            ct = st[0]
            ans[hi] = ct
            hi += 1
        if dt[ct] == 1:
            del dt[ct]
            if ct == st[0]:
                st = st[1:]
            else:
                st = st[:-1]
        else:
            dt[ct] -= 1

print(''.join(ans))
