Solution to problem 33