Sam, Ruff, and Lady are three dogs whose houses are inside a yard with brick walls and square paving stones. To leave the yard, each dog has to go through its own special gate shown in the picture above. Your problem is to design paths that the dogs can follow to get to their own gates. Sam's path should be coloured yellow, Ruff's should be colored green, and Lady's should be blue.
The paths are made by colouring the paving stones. Each path has to be made of coloured stones that are connected edge to edge (not corner to corner), and of course the paths are not allowed to cross. In the picture on the left, a path for Sam has been made, but you can see that there is a problem: there is no way to make Lady's blue path reach her gate without crossing Sam's path.
Instead of colouring, you can save some time by cutting out about twenty yellow squares, twenty blue squares, and twenty green squares and placing them on the paving stones.
This is a variation of The Quarrelsome Neighbors by Sam Loyd