Simple solution by Python 3
\nclass Solution:\n    def sortString(self, s: str) -> str:\n        s = list(s)\n        result = \'\'\n        while s:\n            for letter in sorted(set(
```\nclass Solution:\n    def sortString(self, s: str) -> str:\n        s = list(s)\n        result = \'\'\n        while s:\n            for letter in sorted(set(s)):\n                s.remove(letter)\n                result += letter\n            for letter in sorted(set(s), reverse=True):\n                s.remove(letter)\n                result += letter\n        return result\n```
['Python3']