Python 3 DFS
\nclass Solution:\n    def findLexSmallestString(self, s: str, a: int, b: int) -> str:\n        b = b % len(s)\n\n        def dfs(s: str) -> None:\n            
```\nclass Solution:\n    def findLexSmallestString(self, s: str, a: int, b: int) -> str:\n        b = b % len(s)\n\n        def dfs(s: str) -> None:\n            if s in seen:\n                return\n            seen.add(s)\n\n            add: str = \'\'.join([c if i % 2 == 0 else str((int(c) + a) % 10) for i, c in enumerate(s)])\n            dfs(add)\n\n            rotate: str = s[-b:] + s[:-b]\n            dfs(rotate)\n\n        seen: Set[str] = set()\n        dfs(s)\n        return min(seen)\n```
['Depth-First Search', 'Python3']