Implemented Problem 37