An exercise using multidimensional arrays