n = int(input())
l = list(map(int, input().split()))
m = int(input())
l.append(m)
l.sort()
print(' '.join(map(str, l)))