Photoshoot
Farmer John is arranging his cows numbered for a photoshoot. Initially, FJ planned for the -th cow from the left to be the cow numbered , and wrote down the permutation on a sheet of paper. Unfortunately, that paper was recently stolen by Farmer Nhoj!
Fortunately, there might still be a chance for FJ to recover the permutation that he originally wrote down. Before the sheet was stolen, Bessie recorded the sequence , which satisfies for each .
Based on Bessie's information, help FJ restore the "lexicographically minimum" permutation a that could have produced . A permutation is lexicographically smaller than a permutation if for some , for all and (in other words, the two permutations are identical up to a certain point, at which is smaller than ). It is guaranteed that at least one such a exists.
Input
The first line contains a single integer . The second line contains integers .
Output
Print the lexicographically minimum permutation .
Examples
Note
produces because , , and .