import queue def solution(n,b): if b[0] >= n or b[0] < 0: return False if b[1] >= n or b[1] < 0: return False return True def result(n,y1,a): res=[] for y2 in range(1,n): if (y1,y2) in a: res.append(a[(y1,y2)]) elif (y2,y1) in a: res.append(a[(y2,y1)]) else: rep=(search(y1,y2,n)) a[(y1,y2)]=rep res.append(rep) return res def search(y1,y2,n): x={} y={} worklist = queue.Queue() worklist.put((0,0)) while worklist.qsize() != 0: b=worklist.get() if b in x: continue x[b]=True for k in compute(y1,y2,n,b): if solution(n,k) and k not in x: worklist.put(k) y[k]=b else: continue if (n-1,n-1) in x: res=sol(n,y) return res else: return -1 def compute(y1,y2,n,b): x1=b[0] x2=b[1] arr=[] arr.append((x1+y1,x2+y2)) arr.append((x1+y1,x2-y2)) arr.append((x1-y1,x2+y2)) arr.append((x1-y1,x2-y2)) arr.append((x1+y2,x2+y1)) arr.append((x1+y2,x2-y1)) arr.append((x1-y2,x2+y1)) arr.append((x1-y2,x2-y1)) return arr def sol(n,y): tot=0 b=(n-1,n-1) while b in y: p=y[b] tot=tot+1 if p == (0,0): return tot else: b=p if __name__ == "__main__": n=int(input()) a={} for i in range(1,n): res=result(n,i,a) print(str(res)[1:-1].replace(",",""))