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

bccdb
 z
 dfdeed
 aab
 y
 abac

a = list(raw_input())
b = list(raw_input())

a.sort()
b.sort()

b = list(reversed(b))

n = len(a)

i = 0
count = 0

res = ""

for count in range(0,n):
	res = res + str('?')

bptr = 0
aptr = 0


for count in range(0,n):
	skip = 0
	if count%2 == 0:
		tempPtr = bptr
		while tempPtr<len(b) and (b[tempPtr] < a[aptr]):
			skip = skip + 1
			tempPtr = tempPtr + 1
		if tempPtr == n:
			tempPtr = n - 1
			while(res[tempPtr]!='?'):
				tempPtr = tempPtr - 1
		
			res = list(res)
			res[tempPtr] = a[aptr]
			res = "".join(res)

			# print res
			a = "".join(a)
			a = a.replace(a[aptr], "")
			a = list(a)
		else:
			j = 0
			while j < n:
				if res[j] == '?':
					skip = skip - 1
					lastQ = j
				if skip == -1:
					break;
				j = j + 1

			if ( j >= n ):
				j = lastQ
			res = list(res)
			res[j] = a[aptr]
			res = "".join(res)
			# print res
			a = "".join(a)
			a = a.replace(a[aptr], "")
			a = list(a)
	else:
		tempPtr = aptr
		while tempPtr<len(a) and (a[tempPtr] > b[bptr]):
			skip = skip + 1
			tempPtr = tempPtr + 1
		if tempPtr == n:
			tempPtr = n - 1
			while(res[tempPtr]!='?'):
				tempPtr = tempPtr - 1
			# res[tempPtr] = b[bptr]

			res = list(res)
			res[tempPtr] = b[bptr]
			res = "".join(res)

			# print res

			b = "".join(b)
			b = b.replace(b[bptr], "")
			b = list(b)

		else:
			j = 0
			while j < n:
				if res[j] == '?':
					skip = skip - 1
					lastQ = j
				if skip == -1:
					break;
				j = j + 1
			# res[j] = b[bptr]
			if ( j >= n ):
				j = lastQ
			res = list(res)
			res[j] = b[bptr]
			res = "".join(res)
			# print res
			b = "".join(b)
			b = b.replace(b[bptr], "")
			b = list(b)



print res