Update Puzzle.py

added handling