PythonExercise Generate a NxM 2D array where each cell is labeled according to their order in a specific traversal.