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

AA
AA
B B
B B
AAB B
AAB B