Simple BFS that can solve basic puzzles.