Easy to Understand C++ Code || Short Code
\nclass Solution {\npublic:\n    string breakPalindrome(string S) {\n        int N = S.size();\n        if(N == 1) return "";\n        int i=0, j=N-1;\n        
```\nclass Solution {\npublic:\n    string breakPalindrome(string S) {\n        int N = S.size();\n        if(N == 1) return "";\n        int i=0, j=N-1;\n        while(i <= j){\n            if(S[i] != \'a\' && i!=N/2){\n               S[i] = \'a\';\n               return S;\n            }\n            i++, j--;\n        }\n        S.back() = \'b\';\n        return S;\n    }\n};\n```
[]