{"raw_statement":[{"iden":"problem statement","content":"Given is a sequence of $N$ integers $A=(A_1,A_2,\\cdots,A_N)$.\nSnuke now chooses a value in $A$. Let $x$ be the value chosen. Then, he makes an integer sequence $a$ by lining up all elements of $A$ that are not $x$ without changing the order.\nFind the lexicographically smallest sequence that can be obtained as $a$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 200000$\n*   $1 \\leq A_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$\n$A_1$ $A_2$ $\\cdots$ $A_N$"},{"iden":"sample input 1","content":"5\n2 4 4 1 2"},{"iden":"sample output 1","content":"2 1 2\n\nFor example, when $x=2$, we will have $a=(4,4,1)$. When $x=4$, we will have $a=(2,1,2)$, which is the lexicographically smallest."},{"iden":"sample input 2","content":"3\n1 1 1"},{"iden":"sample output 2","content":"When $x=1$, $a$ will be empty, which is obviously the lexicographically smallest. As a side note, the output may contain additional spaces or newlines."},{"iden":"sample input 3","content":"5\n1 1 2 3 3"},{"iden":"sample output 3","content":"1 1 2"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}