Python | Reverse filling | Easy and clean solution
\nclass Solution:\n    def getSmallestString(self, n: int, k: int) -> str:\n            result, k, i = [\'a\']*n, k-n, n-1\n            while k:\n              
```\nclass Solution:\n    def getSmallestString(self, n: int, k: int) -> str:\n            result, k, i = [\'a\']*n, k-n, n-1\n            while k:\n                k = k + 1\n                if k/26 >= 1:\n                    result[i], k, i = \'z\', k-26, i-1\n                else:\n                    result[i], k = chr(k + 96), 0\n            return \'\'.join(result)\n```\n**I hope that you\'ve found this useful.**\n**In that case, please upvote. It motivates me to write more such posts\uD83D\uDE03**\nComment below if you have any queries.
['String', 'Python']