public static void main(String[] args) {
		int n;
		if (args.length == 1) {
			n = Integer.valueOf(args[0]);
			int[][] A = new int[1 << n][1 << n];
			int k = 1;
			for (int i = 0; i < A.length; ++i) {
				for (int j = 0; j < A[i].length; ++j) {
					A[i][j] = k++;
				}
			}
			int[][] B = copy(A);
			rotate_matrix(B);
			check_answer(A, B);
		} else {
			Random gen = new Random();
			for (int times = 0; times < 100; ++times) {
				n = gen.nextInt(10) + 1;
				int[][] A = new int[1 << n][1 << n];
				int k = 1;
				for (int i = 0; i < A.length; ++i) {
					for (int j = 0; j < A[i].length; ++j) {
						A[i][j] = k++;
					}
				}
				int[][] B = copy(A);
				rotate_matrix(B);
				check_answer(A, B);
			}
		}
	}