import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int d = sc.nextInt(); for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ if(i == 0 || j == 0){ System.out.print(1); }else{ System.out.print(0); } } System.out.println(); } } }