1 - The line starts from S and ends at F.
2 - The line does not cross or overlap itself at any point.
3 - The line divides the grid into regions each with exactly two As and two Bs.
+---+---+---+---+---F | A | B | A | | B | +---+---+---+---+---+ | | B | | | B | +---+---+---+---+---+ | A | | B | | A | +---+---+---+---+---+ | A | A | | A | B | +---+---+---+---+---+ | B | | B | | A | S---+---+---+---+---+An example of a solved grid:
+ + +---F B A | A +---+---+ + | B S + + +