Solution to problem 26