{"raw_statement":[{"iden":"problem statement","content":"You are given a string $S$ of length $N$ consisting of lowercase English letters and the characters `(` and `)`.  \nPrint the string $S$ after performing the following operation as many times as possible.\n\n*   Choose and delete a contiguous substring of $S$ that starts with `(`, ends with `)`, and does not contain `(` or `)` other than the first and last characters.\n\nIt can be proved that the string $S$ after performing the operation as many times as possible is uniquely determined without depending on how it is performed."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2 \\times 10^5$\n*   $N$ is an integer.\n*   $S$ is a string of length $N$ consisting of lowercase English letters and the characters `(` and `)`."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$N$\n$S$"},{"iden":"sample input 1","content":"8\na(b(d))c"},{"iden":"sample output 1","content":"ac\n\nHere is one possible procedure, after which $S$ will be `ac`.\n\n*   Delete the substring `(d)` formed by the fourth to sixth characters of $S$, making it `a(b)c`.\n*   Delete the substring `(b)` formed by the second to fourth characters of $S$, making it `ac`.\n*   The operation can no longer be performed."},{"iden":"sample input 2","content":"5\na(b)("},{"iden":"sample output 2","content":"a("},{"iden":"sample input 3","content":"2\n()"},{"iden":"sample output 3","content":"The string $S$ after the procedure may be empty."},{"iden":"sample input 4","content":"6\n)))((("},{"iden":"sample output 4","content":")))((("}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}