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

bccdb
 z
 dfdeed
 aab
 y
 abac

"""import string

igor = input()
oleg = input()

igor = [x for x in igor]
oleg = [x for x in oleg]

alphabet = list(string.ascii_lowercase)

def maxPosition(x):
    maxposition = 0
    for i in x:
        position = alphabet.index(i)
        if position>maxposition:
            maxposition = position
    return maxposition

def minPosition(x):
    minposition = 25
    for i in x:
        position = alphabet.index(i)
        if position<minposition:
            minposition = position
    return minposition

a =['b','c','d']


left= 0
right= len(oleg)
output = ['?' for i in range(len(oleg))]

for i in range(len(igor)):
    #igor turn
    #put the smallest word posible
    if i%2 != 0:
        #igor has the smallest word
        if minPosition(igor)<minPosition(oleg):
            alphabetletter = alphabet[minPosition(igor)]
            output[left] = alphabetletter
            left += 1
            igor.pop(igor.index(alphabetletter))
            i+=1
        elif minPosition(igor)>maxPosition(oleg):
            output[right] = igor[maxPosition(igor)]
            right -= 1
            igor.pop(maxPosition(igor))
    #oleg turn
    elif i%2 == 0:
        if maxPosition(igor)<maxPosition(oleg):
            output[left] = oleg[maxPosition(oleg)]
            left += 1
            oleg.pop(oleg[maxPosition(igor)])
            i+=1
        elif minPosition(igor)>maxPosition(oleg):
            output[right] = igor[minPosition(oleg)]
            right -= 1
            igor.pop(minPosition(oleg))

print(output)"""

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

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

ans = list()
for i in a:
    ans.append("a")

len1 = len(a)//2 - 1
len2 = len(a)//2 - 1

if len(a)%2:
    len1 = len1 + 1#whats the point


i = 0 # first
j = 0 # end

#what does all this represent
flag = 0#???
ai = 0#left position of a
aj = 0#right position
bi = 0#left position of b
bj = 0#right position

while i + j < len(a):
    if i + j < len(a):
        if a[ai] < b[bi] and flag == 0:#smallest of a is smaller then the smallest of b
            ans[i] = a[ai]             #left side of ans will take on smallest of a
            i = i + 1
            ai = ai + 1
        else:                               #smallest of a is bigger then the smallest of b
            ans[len(a)-j-1] = a[len1 - aj]
            j = j + 1#right +1
            aj = aj + 1#right a + 1
            flag = 1 #???flag
    if i + j < len(a):
        if a[ai] < b[bi] and flag == 0: #smallest of a is smaller then the smallest of b
            ans[i] = b[bi] #left side of ans will take on the smallest of b
            i = i + 1   #move on to next position of ans
            bi = bi + 1
        else:                                ##smallest of a is bigger then the smallest of b
            ans[len(a)-j-1] = b[len2 - bj]  #rightmost position of ans
                                            # will take on the rightmost position of b
            j = j + 1   #move on to the left side position of ans
            bj = bj + 1 #move on to the left side position of b
            flag = 1 #

print("".join(ans))

