# Arup Guha
# 2/4/2023
# Solution to 2022 NAQ Problem: Class Field Trip

# Get input.
a = input().strip()
b = input().strip()

i = 0
j = 0

# Like sorted list matching...sweep two "pointers"
while i < len(a) or j < len(b):

    if j == len(b) or (i < len(a) and a[i] < b[j]):
        print(a[i], end="")
        i+=1
    else:
        print(b[j], end="")
        j+=1
print()
                       
