n=int(input()) a=[] for i in range(n+1): for j in range(n+1): a.append(int((1<