{"raw_statement":[{"iden":"problem statement","content":"$N$ balls are lined up in a row from left to right. Initially, the $i$\\-th ($1 \\leq i \\leq N$) ball from the left has an integer $i$ written on it.\nTakahashi has performed $Q$ operations. The $i$\\-th ($1 \\leq i \\leq Q$) operation was as follows.\n\n*   Swap the ball with the integer $x_i$ written on it with the next ball to the right. If the ball with the integer $x_i$ written on it was originally the rightmost ball, swap it with the next ball to the left instead.\n\nLet $a_i$ be the integer written on the $i$\\-th ($1 \\leq i \\leq N$) ball after the operations. Find $a_1,\\ldots,a_N$."},{"iden":"constraints","content":"*   $2 \\leq N \\leq 2 \\times 10^5$\n*   $1 \\leq Q \\leq 2 \\times 10^5$\n*   $1 \\leq x_i \\leq N$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $Q$\n$x_1$\n$\\vdots$\n$x_Q$"},{"iden":"sample input 1","content":"5 5\n1\n2\n3\n4\n5"},{"iden":"sample output 1","content":"1 2 3 5 4\n\nThe operations are performed as follows.\n\n*   Swap the ball with $1$ written on it with the next ball to the right. Now, the balls have integers $2,1,3,4,5$ written on them, from left to right.\n*   Swap the ball with $2$ written on it with the next ball to the right. Now, the balls have integers $1,2,3,4,5$ written on them, from left to right.\n*   Swap the ball with $3$ written on it with the next ball to the right. Now, the balls have integers $1,2,4,3,5$ written on them, from left to right.\n*   Swap the ball with $4$ written on it with the next ball to the right. Now, the balls have integers $1,2,3,4,5$ written on them, from left to right.\n*   Swap the ball with $5$ written on it with the next ball to the left, since it is the rightmost ball. Now, the balls have integers $1,2,3,5,4$ written on them, from left to right."},{"iden":"sample input 2","content":"7 7\n7\n7\n7\n7\n7\n7\n7"},{"iden":"sample output 2","content":"1 2 3 4 5 7 6"},{"iden":"sample input 3","content":"10 6\n1\n5\n2\n9\n6\n6"},{"iden":"sample output 3","content":"1 2 3 4 5 7 6 8 10 9"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}