JAVA simple solution 100%
\nclass Solution {\n    Set<String> set;\n    String smallest;\n    \n    public String findLexSmallestString(String s, int a, int b) {\n        set = new HashS
```\nclass Solution {\n    Set<String> set;\n    String smallest;\n    \n    public String findLexSmallestString(String s, int a, int b) {\n        set = new HashSet<>();    \n        smallest = s;\n        \n        helper(s, a, b);\n        \n        return smallest;\n    }\n    \n    void helper(String s, int a, int b) {\n        if(set.contains(s)) {\n            return;\n        }\n        \n        if(s.compareTo(smallest) < 0) {\n            smallest = s;\n        }\n        \n        set.add(s);\n        \n        helper(rotate(s, b), a, b);\n        helper(add(s, a), a, b);\n    }\n    \n    String rotate(String s, int pos) {\n        int len = s.length() - pos;\n        return s.substring(len) + s.substring(0, len);\n    }\n    \n    String add(String s, int a) {\n        StringBuilder sb = new StringBuilder();\n        for(int i = 0; i < s.length(); i++) {\n            char c = s.charAt(i);\n            if(i % 2 == 1) {\n                int sum = ((c-\'0\') + a) % 10;\n                c = (char) (sum + 48);\n            }\n            sb.append(c);\n        }\n        \n        return sb.toString();\n    }\n}\n```
[]