NFEB5-need suggestion

giveme answer for this testcase ABBABA??

This is a question of an ongoing contest and Codechef’s policy forbids you from discussing Live contest questions or any test cases. Please post this after the contest.

//