sovle the spiral matrix problem.