{"raw_statement":[{"iden":"problem statement","content":"Snuke has an empty sequence $a$.\nHe will perform $N$ operations on this sequence.\nIn the $i$\\-th operation, he chooses an integer $j$ satisfying $1 \\leq j \\leq i$, and insert $j$ at position $j$ in $a$ (the beginning is position $1$).\nYou are given a sequence $b$ of length $N$. Determine if it is possible that $a$ is equal to $b$ after $N$ operations. If it is, show one possible sequence of operations that achieves it."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $1 \\leq N \\leq 100$\n*   $1 \\leq b_i \\leq N$"},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$b_1$ $\\dots$ $b_N$"},{"iden":"sample input 1","content":"3\n1 2 1"},{"iden":"sample output 1","content":"1\n1\n2\n\nIn this sequence of operations, the sequence $a$ changes as follows:\n\n*   After the first operation: $(1)$\n*   After the second operation: $(1,1)$\n*   After the third operation: $(1,2,1)$"},{"iden":"sample input 2","content":"2\n2 2"},{"iden":"sample output 2","content":"\\-1\n\n$2$ cannot be inserted at the beginning of the sequence, so this is impossible."},{"iden":"sample input 3","content":"9\n1 1 1 2 2 1 2 3 2"},{"iden":"sample output 3","content":"1\n2\n2\n3\n1\n2\n2\n1\n1"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}