Solution to problem 46