Python Easy Greedy Solution!!
Intuition\n Describe your first thoughts on how to solve this problem. \n\n\n# Code\n\nclass Solution:\n    def getSmallestString(self, s: str, k: int) -> str:\
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n\n# Code\n```\nclass Solution:\n    def getSmallestString(self, s: str, k: int) -> str:\n        res_list = []\n        count = 0\n        dic = [\'a\', \'b\', \'c\', \'d\', \'e\', \'f\', \'g\', \'h\', \'i\', \'j\', \'k\', \'l\', \'m\', \'n\', \'o\', \'p\', \'q\', \'r\', \'s\', \'t\', \'u\', \'v\', \'w\', \'x\', \'y\', \'z\']\n\n        def findMinDist(c1, c2):\n            dis1 = (ord(c1) - ord(c2)) % 26\n            dis2 = (ord(c2) - ord(c1)) % 26\n            return min(dis1, dis2)\n\n        for c in s:\n             for dic_c in dic:\n                curMinDist = findMinDist(c, dic_c)\n                if count + curMinDist <= k:\n                    count += curMinDist\n                    res_list.append(dic_c)\n                    break\n        \n        return \'\'.join(res_list)\n\n    \n    \n            \n    \n        \n```
['Python3']