Олимпиадный тренинг

Задача 38864. Spaceship


Задача

Темы:
On his way to save the town of Angel Grove, Black Ranger Zach Taylor has encountered yet another obstacle. The ranger was on an alien spaceship surrounded by enemies, and now, in order to free himself, he needs to destroy all the enemies in a certain order.
Each of the n enemies has the power fi. However, among them there is a main enemy — a boss whose strength is equal to the sum of the strengths of all other enemies. Since the destruction of the boss requires full concentration and focus, Zack will only be able to deal with him after destroying all the other enemies.
The ranger has little time left, so he does not have time to understand who is the boss. He needs your help. Restore the order in which Zack Taylor must destroy the enemies in order to escape to freedom.

Input
The first line contains a natural number n — number of enemies (3 ≤ n ≤ 105).
The second line contains n integers fi specifying the strength of each enemy (-109 ≤ fi ≤ 109 ).
The forces of the enemies are given in random order.

Imprint
In a single line print the numbers fi in the order in which the enemies corresponding to them will be destroyed by the ranger. If there are multiple orders, print any.
It is guaranteed that the solution always exists, and there is exactly one enemy that can be the boss.
 
Examples
# Input Output
1 3
2 5 3
2 3 5
2 5
-1 1 0 1 -1
-1 1 1 -1 0