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

bccdb
 z
 dfdeed
 aab
 y
 abac

#!/usr/bin/env python3
# -*- encoding: utf-8 -*-

import sys

def main():
    oleg = list(sys.stdin.readline().strip('\n'))
    igor = list(sys.stdin.readline().strip('\n'))
    n = len(oleg)
    noleg = int(n/2) +1
    nigor = n - noleg
    pre, suf = [], []
    oleg.sort()
    igor.sort(reverse=True)
    oleg = oleg[:noleg]
    igor = igor[:nigor]
    while oleg or igor:
        if igor:
            if igor[0] <= oleg[0]:
                suf.append(oleg.pop())
            else:
                pre.append(oleg.pop(0))
            if oleg:
                if igor[0] <= oleg[0]:
                    suf.append(igor.pop())
                else:
                    pre.append(igor.pop(0))
            else:
                suf.append(igor.pop())
        else:
            suf.append(oleg.pop())
    print("".join(pre+suf[::-1]))
main()
