Traversal
\n\n# Code\n\nclass Solution:\n    def smallestString(self, s: str) -> str:\n        used = False\n        s = list(s)\n        last_a = 0\n        for i, c in 
\n\n# Code\n```\nclass Solution:\n    def smallestString(self, s: str) -> str:\n        used = False\n        s = list(s)\n        last_a = 0\n        for i, c in enumerate(s):\n            if c != \'a\':\n                s[i] = chr(ord(c)-1)\n                used = True\n            else:\n                last_a = i\n                if used == True:\n                    break\n                else:\n                    continue\n        if used == False:\n            s[last_a] = \'z\'\n        return "".join(s)\n```
['Python3']