Solution to the puzzles