A solution to part 1 of the pet breeder exercise.