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

bccdb
 z
 dfdeed
 aab
 y
 abac

from collections import deque
import math
s = sorted(input(), reverse=True)
l = len(s)
small = deque(s[l//2:])
big = deque(sorted(input())[math.ceil(l/2):])
pre = ""
suf = ""
while len(pre+suf) < l:
    if len(big):
        if small[-1] <= big[0]:
            pre += small.pop()
        else:
            suf = small.popleft()+suf
    else:
        pre += small.pop()
    if len(pre+suf) < l:
        if len(small):
            if big[-1] >= small[0]:
                pre += big.pop()
            else:
                suf = big.popleft()+suf
        else:
            pre += big.pop()
print(pre+suf)