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

bccdb
 z
 dfdeed
 aab
 y
 abac

def create_char_arrays(string1,string2,alphabet):
    char_indexes={}
    char_array1=[]
    char_array2=[]
    new_string=[]

    for index in range(len(alphabet)):
        char=alphabet[index]
        char_indexes[char]=index
        char_array1.append(0)     
        char_array2.append(0)

    for char in string1:
        char_index=char_indexes[char]
        char_array1[char_index]+=1
        new_string.append(0)

    for char in string2:
        char_index=char_indexes[char]
        char_array2[char_index]+=1

    result=[char_array1,char_array2,new_string]
    return result


def get_next_index(char_array,index,increment):
    amount=char_array[index]
    while amount==0:
        index+=increment
        amount=char_array[index]
    return index


def create_string(string1,string2):
    alphabet="abcdefghijklmnopqrstuvwxyz"
    char_array1,char_array2,new_string=create_char_arrays(string1,string2,alphabet)
    index1=0
    index2=len(char_array2)-1
    front_index=0
    end_index=len(new_string)-1
    player_turn=0
    count=len(string1)
    
    while count>0:
        index1=get_next_index(char_array1,index1,1)
        index2=get_next_index(char_array2,index2,-1)
        char1=alphabet[index1]
        char2=alphabet[index2]
        
        if player_turn==0 and index1<index2:
            new_string[front_index]=char1
            front_index+=1
            char_array1[index1]-=1
        elif player_turn==0 and index1>=index2:
            new_string[end_index]=char1
            end_index-=1
            char_array1[index1]-=1
        elif player_turn==1 and index1<index2:
            new_string[front_index]=char2
            front_index+=1
            char_array2[index2]-=1
        elif player_turn==1 and index1>=index2:
            new_string[end_index]=char2
            end_index-=1
            char_array2[index2]-=1
        player_turn=(player_turn+1)%2
        count-=1

    result="".join(new_string)
    return result


string1=input()
string2=input()
result=create_string(string1,string2)
print(result)