python simple solution speed 98.46% and memory 99.39%
\nclass Solution:\n    def removeOuterParentheses(self, S: str) -> str:\n        ans = []\n        l = []\n        count = 0\n        for i in S:\n            l
```\nclass Solution:\n    def removeOuterParentheses(self, S: str) -> str:\n        ans = []\n        l = []\n        count = 0\n        for i in S:\n            l.append(i)\n            if i == \'(\':\n                count+= 1\n            else:\n                count -= 1\n            if count == 0:\n                ans.extend(l[1:-1])\n                l = []\n        return "".join(ans)\n\t\t\n\t# Kindly upvote if you find it useful !!\n```
['Python']