evaluated solution for the cat, the parrot, and the bag of seed problem