Added code for outputting the path used in the matrix for obtaining the
maximum sum of apples.