n = int(input())
a = list(map(int, input().split()))

for i in range(2*n - 3):
	q = list(range(i+1))

	tmp = (q[-1] + 2) // 2

	p = q[::-1][tmp:n]
	q = q[tmp:n]

	for pp,qq in zip(p, q):
		if a[pp] > a[qq]:
			a[pp], a[qq] = a[qq], a[pp]

print(*a)