Finish problem 46 solution