Add exercise 1.31.a