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

bccdb
 z
 dfdeed
 aab
 y
 abac

s1=raw_input()
s2=raw_input()
a,b=[],[]
for i in range(len(s1)):
	a.append(s1[i])
	b.append(s2[i])
a=sorted(a)
b=sorted(b)
a1,b1,s,la,turn=0,len(b)-1,['-']*len(a),len(a)-1,0
for i in range(len(a)):
	if a[a1] > b[b1]:
		k=i
		# print turn
		# turn = (turn+1)%2
		# turn=0
		while k != len(a):
			if len(a) - k == 1 and (len(a) - i)%2 == 1:
				if turn == 1:
					s[k]=b[b1]
					b1-=1
				else:
					s[k] = a[a1]
					a1+=1
			else:
				if turn == 0:
					s[k]=b[b1]
					b1-=1
				else:
					s[k] = a[a1]
					a1+=1
			k+=1
			turn = (turn+1)%2
		break
	if turn==0: 
		if a[a1] <= b[b1]:
			# print 'If of 1'
			s[i]=a[a1]
			a1+=1
	else: 
		if a[a1] <= b[b1]:
			# print 'If of 2'
			s[i]=b[b1]
			b1-=1
	turn = (turn+1)%2
	# print s
s1=''
for i in s: s1+=i
print s1