Problem 39 Solution.