Solve Problem 6