some puzzles in python