Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

VSORTDESCABSSLOW - Basic Sorting with Custom Order

Given a sequence of n integers a1, a2,... an. Sort it in descending order of absolute value (|a'1| ≥ |a'2| ≥ ... ≥ |a'n|). Note that if two items have the same absolute value, the positive one comes first in the list.

Input

Line 1: contains the integer n (1 ≤ n ≤ 103).

Line 2 to n + 1: (i + 1)-th line contains the integer ai (|ai| ≤ 109)

Output

Line 1 to n: each line contains each item of the sequence in desired order.

Example

Input:
3
1
3
2 Output: 3
2
1

Được gửi lên bởi:Viet-Hoa Do
Ngày:2017-07-17
Thời gian chạy:1s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:ASM32-GCC ASM32 ASM64 BASH C-CLANG C C++ 4.3.2 CPP CPP14 CPP14-CLANG C99 GO

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.