{"raw_statement":[{"iden":"problem statement","content":"#nck { width: 30px; height: auto; }You are given a permutation $p$ of the set {$1, 2, ..., N$}. Please construct two sequences of positive integers $a_1$, $a_2$, ..., $a_N$ and $b_1$, $b_2$, ..., $b_N$ satisfying the following conditions:\n\n*   $1 \\leq a_i, b_i \\leq 10^9$ for all $i$\n*   $a_1 < a_2 < ... < a_N$\n*   $b_1 > b_2 > ... > b_N$\n*   $a_{p_1}+b_{p_1} < a_{p_2}+b_{p_2} < ... < a_{p_N}+b_{p_N}$"},{"iden":"constraints","content":"*   $2 \\leq N \\leq 20,000$\n*   $p$ is a permutation of the set {$1, 2, ..., N$}"},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$p_1$ $p_2$ $...$ $p_N$"},{"iden":"sample input 1","content":"2\n1 2"},{"iden":"sample output 1","content":"1 4\n5 4\n\n$a_1 + b_1 = 6$ and $a_2 + b_2 = 8$. So this output satisfies all conditions."},{"iden":"sample input 2","content":"3\n3 2 1"},{"iden":"sample output 2","content":"1 2 3\n5 3 1"},{"iden":"sample input 3","content":"3\n2 3 1"},{"iden":"sample output 3","content":"5 10 100\n100 10 1"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}