Implemented Problem 46