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

bccdb
 z
 dfdeed
 aab
 y
 abac

oleg=sorted(raw_input())

igor=sorted(raw_input(),reverse=True)
n=len(oleg)
ans=''
i=0
flag=0

if(oleg[0]>=igor[0]):
    while(len(ans)<n):
        ans=ans+igor[i]+oleg[i]
        i+=1
    if(len(ans)>n):
        ans=ans[0:len(ans)-2]
        i=i-1
        ans=ans+oleg[i]
else:
    while(len(ans)<n):
        
        ans=ans+oleg[i]+igor[i]
        i+=1
    



    
        
if(len(ans)==n):
    print ans
else:
    print ans[0:len(ans)-1]
    
    
        
