Code for problem 55.