Pass if no space between "A", space between "B".
A
A
A
A
B B
B B
AAB B
AAB B