x = list(map(int, input().split())) y = list(map(int, input().split())) s = x+y s.sort() for i in range(len(s)): print(s[i], end=" ")