n=int(input()) a=list(map(int,input().split())) m=int(input()) a.append(m) a.sort(reverse=True) for i in a: print(i,end=" ")