n = int(input())
a = list(map(int,input().split()))
b = sorted(a)
aj = [a[0]]
for i in range(1,n-1):
    if a.index(b[i]) < n/2:
        aj += [b[i]]
    else:
        aj = [b[i]]+aj
if aj[0] == b[n-1]:
    aj += [b[n]]
else:
    aj = [b[n]]+aj

ans = 0
for i in range(n):


print(ans)