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

bccdb
 z
 dfdeed
 aab
 y
 abac

from collections import deque

a = sorted(input())
l = len(a)
a = deque(a[:(len(a)+1)//2])
b = sorted(input())
b = deque(b[(len(b))//2 +1:])
print(a, b)

result = ["0"] * l
left = 0
right = l - 1

while left <= right:
    if len(b) == 0:
        result[left] = a[0]
        break
    if a[0] > b[-1]:
        result[right] = a[-1]
        right -= 1
        a.pop()
    else:
        result[left] = a[0]
        left += 1
        a.popleft()
    # print(result)
    # print(left, right)
    if a[0] > b[-1]:
        result[right] = b[0]
        right -= 1
        b.popleft()
    else:
        result[left] = b[-1]
        left += 1
        b.pop()
    # print(result)
    # print(left, right)

print("".join(result))