Lexicographically Smallest String After Substring Operation
Shift the earliest non-a run back one letter and stop at the next a, since any earlier change would only raise a letter.
Shift the earliest non-a run back one letter and stop at the next a, since any earlier change would only raise a letter.