Implemented Problem 38