Remove Outermost Parentheses
easy
1. You are given a valid parentheses string in form of A+B+C... where A, B and C are valid primitive strings. 2. A primitive string is a valid parentheses string which cant is split in s = x+y, with x and y nonempty valid parentheses strings. 3. You have to remove the outermost parentheses from all primitive strings. Example "(()())(())" = "(()())" + "(())". removing outermost parentheses from "(()())" and "(())" will result in ()()().
Constraints
1. s.length <= 10000 2. s[i] is "(" or ")" 3. s is a valid parentheses string
Format
Input
Input is managed for you
Output
Output is managed for you
Example
Sample Input
(()())(())
Sample Output
()()()