import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] b = new int[n]; for(int i = 0; i < n; i++){ b[i] = 0; for(int j = 0; j < n; j++){ int x = sc.nextInt(); b[i] += (1<>j)&1) == 1) score += a[j]; } // 高速化出来る(しなくてもよい) // if(score >= ans) continue; int lie = i, confess = 0, k = -1; while(++k < n){ if(((confess>>k)&1) == 1) continue; if((lie&b[k]) == b[k]){ confess |= 1<