Added code for problem 272.