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

bccdb
 z
 dfdeed
 aab
 y
 abac

from collections import deque


def read_set():
    line = input()
    list_ = [x for x in line]
    list_.sort()
    d = deque(list_)
    return d


def oleg(my_chars, opposer_chars, head, tail):
    """
    :param deque my_chars:
    :param deque opposer_chars:
    :param head:
    :param tail:
    :return:
    """
    letter = my_chars.popleft()
    if letter < opposer_chars[-1]:
        head += letter
    else:
        tail = letter + tail

    return head, tail


def igor(my_chars, opposer_chars, head, tail):
    """
    :param deque my_chars:
    :param deque opposer_chars:
    :param head:
    :param tail:
    :return:
    """
    letter = my_chars.pop()
    if letter > opposer_chars[0]:
        head += letter
    else:
        tail = letter + tail

    return head, tail


if __name__ == "__main__":
    s = read_set()
    t = read_set()

    n = len(s)

    gamers = [
        (oleg, s, t),
        (igor, t, s)
    ]

    head = ""
    tail = ""

    for i in range(n):
        gamer, s1, s2 = gamers[i % 2]
        head, tail = gamer(s1, s2, head, tail)

    print(head + tail)




