easy python
class Solution:\n    def sortString(self, s: str) -> str:\n        l=sorted(set(s))\n        out=\'\'\n        ls=list(s)\n        while ls:\n            for i 
class Solution:\n    def sortString(self, s: str) -> str:\n        l=sorted(set(s))\n        out=\'\'\n        ls=list(s)\n        while ls:\n            for i in l:\n                if i in ls:\n                    out+=i\n                    ls.remove(i)\n            for i in l[::-1]:\n                if i in ls:\n                    out+=i\n                    ls.remove(i)\n        return out\n
[]