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

bccdb
 z
 dfdeed
 aab
 y
 abac


import sys
import os
import math
import re

#playing optimally they will each put the largest letter as far forward as they can

a = list(input())
b = list(input())

a.sort()
b.sort(reverse = True)

soln = ['?'] * len(a) 
O = True
f = 0
e = len(a)-1
while (soln.count('?') > 0):
    if (O is False):
        if (a[0] < b[0]):
            soln[f] = b[0]
            f += 1
            b.remove(b[0])
        else:
            soln[e] = b[len(b) -1]
            e -= 1
            b.remove(b[len(b)-1])
        O = True
    else:
        if (a[0] < b[0]):
            soln[f] = a[0]
            a.remove(a[0])
            f += 1
        else:
            soln[e] = a[len(a)-1]
            e -= 1
            a.remove(a[len(a)-1])
        O = False

for i in soln:
    print(i,end = "")

print()

