




Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
How to detect if there is impossible to perform the replacement? Only when the length = 1.
Change the first non 'a' character to 'a'.
What if the string has only 'a'?
Change the last character to 'b'.