Add solution to exercise 1-22.