Python-DFS
\nclass Solution(object):\n    def findLexSmallestString(self, s, a, b):\n        """\n        :type s: str\n        :type a: int\n        :type b: int\n       
```\nclass Solution(object):\n    def findLexSmallestString(self, s, a, b):\n        """\n        :type s: str\n        :type a: int\n        :type b: int\n        :rtype: str\n        """\n        seen = set()\n\n        def cmp(str1, str2):\n            return int(str1)<int(str2)\n        \n        def add_str(s_in):\n            res = ""\n            for i in range(len(s_in)):\n                if i%2:\n                    res += str((int(s_in[i])+int(a))%10)\n                else:\n                    res += s_in[i]\n            return res\n        \n        def rotate_str(s_in):\n            res = s_in[-b:]+s_in[:-b]\n            return res\n        \n        def search(s_in, res_min):\n            if s_in == res_min or s_in in seen:\n                return res_min\n            seen.add(s_in)\n            res_min = res_min if cmp(res_min, s_in) else s_in\n            res_min = search(add_str(s_in), res_min)\n            res_min = search(rotate_str(s_in), res_min)\n            return res_min\n            \n        return search(s, \'9\'*len(s))\n```
[]