dummy = input() num1 = list(map(int,input().split())) num2 = list(map(int,input().split())) num3 = num1 + num2 for i in sorted(num3): print(i,end=' ')