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

bccdb
 z
 dfdeed
 aab
 y
 abac

oleg = list(raw_input())
igor = list(raw_input())

oleg.sort()
igor.sort()

osm, olg, ism, ilg = 0, -1, 0, -1

length = len(oleg)
insert = 0

name = ['?'] * length
for i in range(len(oleg)):
	if i % 2 == 0:
		#Oleg turn
		#If my smallest is your biggest
		if oleg[osm] >= igor[ilg] and length-1 != insert:
			#I'll throw my biggest at the end
			name[length-1] = oleg[olg]
			olg -= 1
			length -= 1
		else:
			name[insert] = oleg[osm]
			osm += 1
			insert += 1
	else:
		#Symmetric
		if igor[ilg] <= oleg[osm] and length-1 != insert:
			name[length-1] = igor[ism]
			ism += 1
			length -= 1
		else:
			name[insert] = igor[ilg]
			ilg -= 1
			insert += 1


print ''.join(name)