You are given a sequence of N integers a1,a2,…,aN. Reorder them so that no element is exactly one greater than the element immediately before it. Formally, the final sequence must satisfy ai+1=ai+1 for every i with 1≤i<N.
If several orderings satisfy this condition, output the lexicographically smallest one.
The input consists of several data sets. Each data set spans two lines. The first line contains the sequence length N (1≤N≤50000). The second line contains N integers a1,a2,…,aN separated by single spaces, each satisfying ∣ai∣≤109. A line containing a single 0 marks the end of the input and is not processed.
For each data set, print the resulting sequence on its own line, with integers separated by single spaces. If no valid ordering exists, print No solution instead.