#! python3

import sys

a = sys.stdin.readline().strip();
b = sys.stdin.readline().strip();
c = list(a+b)
c.sort()
print(''.join(c))
