{"raw_statement":[{"iden":"problem statement","content":"You are given a permutation $P=(P_1,P_2,\\cdots,P_{2N})$ of $(1,2,\\cdots,2N)$.\nThe following operation may be performed between $0$ and $N$ times (inclusive).\n\n*   Choose an integer $x$ ($1 \\leq x \\leq 2N-1$). Swap the values of $P_x$ and $P_{x+1}$.\n\nPresent a sequence of operations that make $P$ satisfy the following conditions.\n\n*   $P_i<P_{i+1}$ for each $i=1,3,5,\\cdots,2N-1$;\n*   $P_i>P_{i+1}$ for each $i=2,4,6,\\cdots,2N-2$.\n\nIt can be proved that such a sequence of operations always exists."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^5$\n*   $(P_1,P_2,\\cdots,P_{2N})$ is a permutation of $(1,2,\\cdots,{2N})$.\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$P_1$ $P_2$ $\\cdots$ $P_{2N}$"},{"iden":"sample input 1","content":"2\n4 3 2 1"},{"iden":"sample output 1","content":"2\n1 3\n\nThese operations make $P=(3,4,1,2)$, which satisfies the conditions."},{"iden":"sample input 2","content":"1\n1 2"},{"iden":"sample output 2","content":"0"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}