Jack and the Beanstalk Puzzle