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

bccdb
 z
 dfdeed
 aab
 y
 abac

import sys
import math
from collections import defaultdict,deque
import heapq
oleg=list(sys.stdin.readline()[:-1])
igor=list(sys.stdin.readline()[:-1])
oleg.sort()
igor.sort()
igor.reverse()
n=len(oleg)
ans=[0 for _ in range(n)]
cnto,cnti=n//2+n%2,n//2
indo,indi=0,0
ind=0
oleg=oleg[:cnto]
igor=igor[:cnti]
igor.reverse()
sto,endo=0,len(oleg)-1
sti,endi=0,len(igor)-1
turn =True
indst,indend=0,n-1
while indst<=indend and (sto<=endo) and (sti<=endi):
	if turn :
		if oleg[sto]<igor[endi]:
			ans[indst]=oleg[sto]
			sto+=1
			indst+=1
		else:
			ans[indend]=oleg[endo]
			endo-=1
			indend-=1
		turn =False
	else:
		if igor[endi]>oleg[sto]:
			ans[indst]=igor[endi]
			endi-=1
			indst+=1
		else:
			ans[indend]=igor[sti]
			sti+=1
			indend-=1
		turn =True
if sto<=endo and indst<=indend:
	ans[indst]=oleg[sto]
	indst+=1
if sti<=endi and indst<=indend:
	ans[indst]=igor[sti]
print(''.join(x for x in ans))

