very easy python solution
Approach\ndon\'t care about n, get most optimal, and split up\n\n# Complexity\n- Time complexity: ay, space-man i bet u don\'t know ur complexity\n\n- Space com
# Approach\ndon\'t care about `n`, get most optimal, and split up\n\n# Complexity\n- Time complexity: ay, space-man i bet u don\'t know ur complexity\n\n- Space complexity: OH YEAH I DO\n\n- Time complexity: Then what is it?\n\n- Space complexity: well... uh... i... i think its $$O(n+k)$$...\n\n- Time complexity: sus... ok. mine is technically $$O(n)$$\n\n# Code\n```\nclass Solution:\n    def getSmallestString(self, n: int, k: int) -> str:\n        firstRes = ""\n        alpha = "abcdefghijklmnopqrstuvwxyz"\n        prev = {}\n        for i in range(1, 26):\n            prev[alpha[i]] = alpha[i-1]\n        while k > 0:\n            place = 26\n            while place > k:\n                place -= 1\n            firstRes = alpha[place-1] + firstRes\n            k -= place\n        i = 0\n        while i < len(firstRes) and firstRes[i] == "a":\n            i += 1\n        while i < len(firstRes) and len(firstRes) < n:\n            firstRes = "a" + firstRes[:i] + prev[firstRes[i]] + firstRes[i+1:]\n            i += 1\n            if firstRes[i] == "a":\n                i += 1\n        return firstRes\n```
['Python3']