spiral matrix, short version