#!/bin/python import sys from itertools import permutations as perm def build_board(n): return [ [-1 for _ in range(n)] for _ in range(n) ] def build_pairs(n): return [[(i, j) for j in range(1, n)] for i in range(1, n)] def legal_moves( x, y, a, b): m = [(x+a, y+b), (x+a, y-b), (x-a, y+b), (x-a, y-b), (x+b, y+a), (x+b, y-a), (x-b, y+a), (x-b, y-a)] return [ p for p in m if (p[0]>=0) and (p[1]>=0) and (p[0] move_count or board[x1][y1] == -1: starts.append( (x1, y1) ) board[x1][y1] = move_count return board[n-1][n-1] n = int(raw_input().strip()) # your code goes here pairs = build_pairs(n) for row in pairs: for a, b in row: print solve_instance(n, a, b), print