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

bccdb
 z
 dfdeed
 aab
 y
 abac

from sys import *

f = lambda: sorted(stdin.readline()[:-1])

a, b = f(), f()

n = len(a)

u = v = ''

i, j = 0, -1

x, y = n - 1 >> 1, n - 2 >> 1

while x != -1:

    if a[i] < b[j]:

        u += a[i]

        i += 1

    else: v += a[i + x]

    x -= 1

    if y == -1: break

    elif a[i] < b[j]:

        u += b[j]

        j -= 1

    else: v += b[j - y]

    y -= 1

print(u + v[::-1])



# Made By Mostafa_Khaled