import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static class P { int x,y,s; P(int x, int y, int s) { this.x=x;this.y=y;this.s=s;}} static int steps(int i, int j, int n) { boolean[][] v = new boolean[n][n]; Queue

q = new LinkedList<>();; q.add(new P(0,0,0)); while (!q.isEmpty()) { P p = q.remove(); if (v[p.x][p.y]) continue; if (p.x==n-1 && p.y==n-1) return p.s; v[p.x][p.y]=true; if (p.x+i=0) q.add(new P(p.x+i,p.y-j,p.s+1)); if (p.x-i>=0 && p.y+j=0 && p.y-j>=0) q.add(new P(p.x-i,p.y-j,p.s+1)); if (p.y+i=0) q.add(new P(p.y+i,p.x-j,p.s+1)); if (p.y-i>=0 && p.x+j=0 && p.x-j>=0) q.add(new P(p.y-i,p.x-j,p.s+1)); } return -1; } public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[][] r = new int[n][n]; for (int i=1; i=i) z = r[i][j]; else z = r[j][i]; System.out.print(z+" "); } System.out.println(); } } }