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

bccdb
 z
 dfdeed
 aab
 y
 abac

R=lambda:map(int,input().split())
a=[]
a.append("".join(sorted(raw_input())))
a.append("".join(sorted(raw_input()))[::-1])
print "".join([a[i][j] for j in range(len(a[0])) for i in range(2)])[:len(a[0])]
