{"raw_statement":[{"iden":"problem statement","content":"Given is a number sequence of length $N$: $p_1, ..., p_N$.\nFor each $i=1, 2, ..., N$, find the minimum non-negative integer that is not equal to any of the numbers $p_1, ..., p_i$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 200,000$\n*   $0 \\leq p_i \\leq 200,000$\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_N$"},{"iden":"sample input 1","content":"4\n1 1 0 2"},{"iden":"sample output 1","content":"0\n0\n2\n3\n\n*   The minimum non-negative integer that is not equal to $p_1=1$ is $0$.\n*   The minimum non-negative integer that is not equal to any of $p_1=1, p_2=1$ is $0$.\n*   The minimum non-negative integer that is not equal to any of $p_1=1, p_2=1, p_3=0$ is $2$.\n*   The minimum non-negative integer that is not equal to any of $p_1=1, p_2=1, p_3=0, p_4=2$ is $3$."},{"iden":"sample input 2","content":"10\n5 4 3 2 1 0 7 7 6 6"},{"iden":"sample output 2","content":"0\n0\n0\n0\n0\n6\n6\n6\n8\n8"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}