{"raw_statement":[{"iden":"problem statement","content":"We have a permutation $P = P_1, P_2, \\ldots, P_N$ of $1, 2, \\ldots, N$.\nYou have to do the following $N - 1$ operations on $P$, **each exactly once**, in some order:\n\n*   Swap $P_1$ and $P_2$.\n    \n*   Swap $P_2$ and $P_3$.\n    $\\vdots$\n    \n*   Swap $P_{N-1}$ and $P_N$.\n    \n\nYour task is to sort $P$ in ascending order by configuring the order of operations. If it is impossible, print `-1` instead."},{"iden":"constraints","content":"*   All values in input are integers.\n*   $2 \\leq N \\leq 2 \\times 10^5$\n*   $P$ is a permutation of $1, 2, \\ldots, N$."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$P_1$ $P_2$ $\\ldots$ $P_N$"},{"iden":"sample input 1","content":"5\n2 4 1 5 3"},{"iden":"sample output 1","content":"4\n2\n3\n1\n\nThe following sequence of operations sort $P$ in ascending order:\n\n*   First, swap $P_4$ and $P_5$, turning $P$ into $2, 4, 1, 3, 5$.\n*   Then, swap $P_2$ and $P_3$, turning $P$ into $2, 1, 4, 3, 5$.\n*   Then, swap $P_3$ and $P_4$, turning $P$ into $2, 1, 3, 4, 5$.\n*   Finally, swap $P_1$ and $P_2$, turning $P$ into $1, 2, 3, 4, 5$."},{"iden":"sample input 2","content":"5\n5 4 3 2 1"},{"iden":"sample output 2","content":"\\-1"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}