Python 100% Stack
\nclass Solution:\n    def removeDuplicates(self, S: str) -> str:\n        stack = []\n        for char in S:\n            if stack and stack[-1] == char:\n    
```\nclass Solution:\n    def removeDuplicates(self, S: str) -> str:\n        stack = []\n        for char in S:\n            if stack and stack[-1] == char:\n                stack.pop()\n            else:\n                stack.append(char)\n        \n        return \'\'.join(stack)\n```
[]