using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { public void Proc() { Reader.IsDebug = false; int len = int.Parse(Reader.ReadLine()); string[,] map = new string[len, len]; int posX = 0; int posY = 0; Dir d = Dir.Right; for(int i=0; i= len || nextY < 0 || nextY >= len || map[nextY, nextX] != null) { nextX = posX; nextY = posY; if(d == Dir.Right) { d = Dir.Down; nextY++; } else if(d == Dir.Left) { d = Dir.Up; nextY--; } else if(d == Dir.Up) { d = Dir.Right; nextX++; } else if(d==Dir.Down) { d = Dir.Left; nextX--; } } posX = nextX; posY = nextY; } for(int i=0; i