import sys

n = input()
l = raw_input().split()
a = [int(i) for i in l]

a = list(set(a))

a.extend([1 for i in range(n)])

a.sort()

ans = ""

m = 0

for i in xrange(1,n+1):
	ans+=str(a[-i]) + ' '
print ans
