Time limit時間制限 : 1.5sec / Memory limitメモリ制限 : 96MB

According to his hypothesis, everytime you setup

- the 1st card in the resulting order is always the
`a_1`-th card in the initial order, - the 2nd card in the resulting order is always the
`a_2`-th card in the initial order, - ..., and so on.

He wanted to know this sequence, so he setup

But KM says that you can guess

The second line of the input file contains N different integers which denotes

`Impossible`

. If there are several possibilities, print `Ambiguous`

. Otherwise, print 3 2 3 1 2

2 3 1

3 2 1 3 2

Impossible

4 2 2 1 4 3

Ambiguous