python water
while True:
try:
n = int(input())
L = list(input().split())
L = [int(e) for e in L]
L1 = [abs(e) for e in L]
for i in range(len(L1)):
for j in range(i+1,len(L1)):
if L1[i] >= L1[j]:
t = L1[i]
L1[i] = L1[j]
L1[j] = t
s = L[i]
L[i] = L[j]
L[j] = s
k = 0
while k < n-1:
print(L[k],end=” “)
k = k + 1
print(L[n-1])
except:
break
while(scanf(“%d”,&n)!=EOF)