import sys

nn = 1
or_list = []
for i in sys.stdin:
    if nn%2 == 0:
        or_list.append(i.strip())
    nn += 1
mm = 0
while True:
    try:
        all_list = or_list[mm].split(" ") + or_list[mm+1].split(" ")
        all_set =list(set(map(int, all_list)))
        all_set.sort()
        print("".join(map(str,all_set)))
        mm += 2
    except Exception:
        break