{"raw_statement":[{"iden":"problem statement","content":"For two strings $A$ and $B$, let $A+B$ denote the concatenation of $A$ and $B$ in this order.\nYou are given $N$ strings $S_1,\\ldots,S_N$. Modify and print them as follows, in the order $i=1, \\ldots, N$:\n\n*   if none of $S_1,\\ldots,S_{i-1}$ is equal to $S_i$, print $S_i$;\n*   if $X$ $(X>0)$ of $S_1,\\ldots,S_{i-1}$ are equal to $S_i$, print $S_i+$ `(` $+X+$ `)`, treating $X$ as a string."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2\\times 10^5$\n*   $S_i$ is a string of length between $1$ and $10$ (inclusive) consisting of lowercase English letters."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$S_1$\n$S_2$\n$\\vdots$\n$S_N$"},{"iden":"sample input 1","content":"5\nnewfile\nnewfile\nnewfolder\nnewfile\nnewfolder"},{"iden":"sample output 1","content":"newfile\nnewfile(1)\nnewfolder\nnewfile(2)\nnewfolder(1)"},{"iden":"sample input 2","content":"11\na\na\na\na\na\na\na\na\na\na\na"},{"iden":"sample output 2","content":"a\na(1)\na(2)\na(3)\na(4)\na(5)\na(6)\na(7)\na(8)\na(9)\na(10)"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}