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