Puzzle #5 solution