Case 1: aaa abb Case 2: bbbbaa aaaabab