N = int(input()) c = [0]*N for i in range(N): X = list(map(int, input().split())) for j in range(N): c[i] ^= X[j]*(1<