ABABAABA - Editorial

ABAAAAABB : for this case will the answer be ABAAAAAB ? if Yes then what case does it falls under ?