for(i,1,n:=File standardInput readLine asNumber,for(j,1,n,if(i==1or i==n or j==1or j==n,1,0)print);" "print)