For this Question: Given a valid parenthesis string S. A valid parentheses string is either empty "", "(" + A + ")", or A + B, where A and B are valid parentheses strings. Decompose the strings S such that S = P1 + P2 +. . + Pk and there does not exist a way to split any of P1, P2,. . Pk into P = A + B, where A and B are nonempty valid parentheses strings.

Print the concatenation of P1, P2,. , Pk after removing the outermost parentheses from each of them.First line contains the string S.

Constraints:
1 <= |S| <= 10^5Print the concatenation of P1, P2,....Pk after removing the outermost parentheses from each of them.Sample Input 1:
(()())(())

Sample Output 1:
()()()

Explanation: 
(()())(()) = (()()) + (())
Concatenating after removing outer parentheses of each part
()() + () = ()()()

Sample Input 2:
(())

Sample Output 2:
()

Explanation: 
After removing outer parentheses of (()), we get (), I have written this Solution Code: def removeOuterParentheses(S):
     
    res = ""
 
    count = 0
 
    for c in S:
         
        if (c == '(' and count > 0):
 
            res += c
 
        if (c == '('):
            count += 1
        if (c == ')' and count > 1):
 
            res += c
             
        if (c == ')'):
          count -= 1
     
    return res
 
if __name__ == '__main__':
     
    S = input()
     
    print(removeOuterParentheses(S)), In this Programming Language: Python, Now tell me if this Code is compilable or not?