How I figured out how to solve the cat, parrot, and bag of seed problem.