Problem D
Aldursröðun
Languages
en
is

Input
The first line of the input contains an integer
Output
The first line of the output should contain the ages of your children after they have been rearranged to fit the criterion above. If there are multiple valid rearrangements, print any of them. If no such rearrangement exists, print ,,Neibb”.
Scoring
Group |
Points |
Constraints |
1 |
50 |
|
2 |
40 |
|
2 |
10 |
No further constraints |
Sample Input 1 | Sample Output 1 |
---|---|
3 2 3 6 |
2 6 3 |
Sample Input 2 | Sample Output 2 |
---|---|
7 5 10 7 15 14 3 2 |
7 14 2 10 5 15 3 |
Sample Input 3 | Sample Output 3 |
---|---|
4 2 5 7 10 |
Neibb |