n=int(input()) a=list(map(int,input().split())) b=[] for _ in range(n): b.append(list(map(int,input().split()))) maxscore=0 bestans=0 for i in range(2**n): bells=[] for j in range(n): if 1<maxscore: maxscore=ans bestans=i print(maxscore) for i in range(n): if 1<