sample_list1 = [int(x) for x in input().split()]
sample_list2 = [int(x) for x in input().split()]

final_list = []
res = []

final_list = sample_list1.merge(sample_list2)

res = sort(final_list)

print(res)