 Final
 Elimination
 Third qual
 Second qual
 First qual
 Warmup
Warmup round completed
Tasks
Show one task per page / all tasks on one page
Time limit  2 seconds 

Memory limit  256 megabytes 
Space Ranger is caught at an alien spaceship. He is surrounded by enemies. To break free he needs to destroy all enemies in some particular order.
There are n enemies around Space Ranger, the ith of them has power f_{i}. To break free Space Ranger needs to destroy all enemies in such order, that the power of the last destroyed enemy is equal to the sum of powers of all other enemies.
Space Ranger is short of time, so he has failed to find the required order. Help him! Find the way to destroy all enemies and break free.
Input format 
The first line of input contains n — the number of enemies (2 ≤ n ≤ 10^{5}). The second line contains n integers f_{i} — powers of the enemies (  10^{9} ≤ f_{i} ≤ 10^{9}). 

Output format 
Output values f_{i} in order in which the enemies must be destroyed. If there are several ways to destroy all enemies and break free, print any one. It is guaranteed that there is at least one way to do it. 
Examples 
Input data
3 2 5 3
Output data
2 3 5 
Input data
5 1 1 0 1 1
Output data
1 1 1 1 0 

