Why do this problem?
Easy to spot solutions but can you be sure they are the only possible solutions?

Possible approach
Use graphs .