{"raw_statement":[{"iden":"problem statement","content":"There is a sequence that contains one $0$, $A=(0)$.  \nAdditionally, you are given a string of length $N$, $S=s_1s_2\\ldots s_N$, consisting of `L` and `R`.\nFor each $i=1, 2, \\ldots, N$ in this order, the following will be done.\n\n*   If $s_i$ is `L`, insert $i$ to the immediate left of $i-1$ in $A$.\n*   If $s_i$ is `R`, insert $i$ to the immediate right of $i-1$ in $A$.\n\nFind the final contents of $A$."},{"iden":"constraints","content":"*   $1\\leq N \\leq 5\\times 10^5$\n*   $N$ is an integer.\n*   $|S| = N$\n*   $s_i$ is `L` or `R`."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$S$"},{"iden":"sample input 1","content":"5\nLRRLR"},{"iden":"sample output 1","content":"1 2 4 5 3 0\n\nInitially, $A=(0)$.  \n$S_1$ is `L`, which makes it $A=(1,0)$.  \n$S_2$ is `R`, which makes it $A=(1,2,0)$.  \n$S_3$ is `R`, which makes it $A=(1,2,3,0)$.  \n$S_4$ is `L`, which makes it $A=(1,2,4,3,0)$.  \n$S_5$ is `R`, which makes it $A=(1,2,4,5,3,0)$."},{"iden":"sample input 2","content":"7\nLLLLLLL"},{"iden":"sample output 2","content":"7 6 5 4 3 2 1 0"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}