N=int(input())
val=list(map(int,input().split(' ')))
num=int(input())
val.append(num)
val.sort()
for i in range(len(val)):
    print(val[i],end=' ')