spiral matrix, substr concat, word search