[Python3] dfs
Traverse the whole graph via the two operations, and return the minimum string. \n\n\nclass Solution:\n    def findLexSmallestString(self, s: str, a: int, b: in
Traverse the whole graph via the two operations, and return the minimum string. \n\n```\nclass Solution:\n    def findLexSmallestString(self, s: str, a: int, b: int) -> str:\n        op1 = lambda s: "".join(str((int(c)+a)%10) if i&1 else c for i, c in enumerate(s))\n        op2 = lambda s: s[-b:] + s[:-b]\n        \n        seen = set()\n        stack = [s]\n        while stack: \n            s = stack.pop()\n            seen.add(s)\n            if (ss := op1(s)) not in seen: stack.append(ss)\n            if (ss := op2(s)) not in seen: stack.append(ss)\n        return min(seen)\n```
['Python3']