Assuming I have such input: AbvfAAmjhAAAkkk
I need to replace maximum number of chars with the char \'A\' in such a way that we don\'t have a sequence of 3 appearance