URI Online Judge | 1259

Even and Odd

By Neilor Tonin, URI Brazil

Timelimit: 1

Considering the input of non-negative integer values​​, sort these numbers ​​according to the following criteria: First the even in ascending order followed by the odd in descending order.

Input

The first line of input contains a positive integer number N (1 < N < 105). This is the number of following input lines. The next N lines contain, each one, a integer non-negative number.

Output

Print all numbers according to the explanation presented above. Each number must be printed in one line as shown below.

Sample Input Sample Output

10
4
32
34
543
3456
654
567
87
6789
98

4
32
34
98
654
3456
6789
567
543
87