Given a string S, this string only contain letter 'a', 'b'.
You should find a string T (also only contain letter 'a', 'b'), so that the string T is not the substring of the string S and the length of the string T as small as better!
If there are multiple solutions, output lexicographically smallest one.
11 aabaaabbbab
4 aaaa
无
本站或者转载