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