Problem 43 solution