CodeEff/ECCO huggingface dataset:
# Original solution
N = int(eval(input()))
honest = [[] for _ in range(N)]
unkind = [[] for _ in range(N)]
MAX = 0
for i in range(0,N):
    A = int(eval(input()))
    for _ in range(A):
        x, y =list(map(int,input().split(' ')))
        if y == 0:
            unkind[i].append(x-1)
        else:
            honest[i].append(x-1)

for i in range(2**N):
    flg = 1
    for j in range(N):
        if ((i>>j) & 1):
            bool1 = all([(i>>k) & 1 for k in honest[j]])
            bool2 = all([~(i>>k) & 1 for k in unkind[j]])
            if not all([(i>>k) & 1 for k in honest[j]]) or not all([~(i>>k) & 1 for k in unkind[j]]):
                flg =0

    if flg:
        cnt = 0
        num = i
        while num:
            num &= num -1
            cnt += 1
        MAX = max(cnt,MAX) 

print(MAX)

# Optimized solution


def main():
    N = int(eval(input()))
    A = []
    for i in range(N):
        a = int(eval(input()))
        XY = []
        for _ in range(a):
            x,y = list(map(int,input().split()))
            XY.append((x-1,y))

        A.append(XY)
    # print(A)

    MAX = 0
    for i in range(2**N):
        # print(i)
        flg = 1
        for j in range(N):
            if (i >>j) & 1:
                # print('b')
                for ch in A[j]:
                    # print(i,ch[0],bin(i >> ch[0]),ch[1],(i >> ch[0])^ ch[1])
                    if ((i >> ch[0])^ ch[1])%2 == 1:
                        # print('a',ch[0])
                        flg = 0

        if flg == 1:
            t = bin(i).count('1')
            MAX = max(t,MAX)
        
    print(MAX)



main()
# Original solution
N = int(eval(input()))
T = [[] for k in range(N)]
for p in range(N):
    A = int(eval(input()))
    for k in range(A):
        x, y = list(map(int,input().split()))
        T[p].append([x-1,y])

ans = 0
for k in range(2**N):
    t = []
    f = []
    for d in range(N):
        if (k>>d)&1 == 1:
            t.append(d)
        else:
            f.append(d)
    flag = 1
    for p in range(N):
        if p in t:
            for e in T[p]:
                if e[1] == 1 and e[0] in f:
                    flag = 0
                    break
                elif e[1] == 0 and e[0] in t:
                    flag = 0
                    break
    if flag == 1:
        ans = max(ans,len(t))
print(ans)


# Optimized solution
N = int(eval(input()))
L = []
for k in range(N):
    t = []
    for l in range(int(eval(input()))):
        x, y = list(map(int,input().split()))
        t.append([x-1,y])
    L.append(t)
ans = 0
for k in range(2**N):
    t = []
    for d in range(N):
        if (k>>d)&1:
            t.append(d)
    flag = 1
    for e in t:
        for f in L[e]:
            if f[0] in t and f[1] == 0:
                flag = 0
                break
            if f[0] not in t and f[1] == 1:
                flag = 0
                break
    ans = max(ans,flag*len(t))
print(ans)
# Original solution
N=int(eval(input()))
X=[0]*N
for i in range(N):
    X[i]=[list(map(int,input().split())) for _ in range(int(eval(input())))]
print((max(['{:03b}'.format(i).count('1')for i in range(2**N) if all([i>>j&1 and all([y[1]==i>>(y[0]-1)&1 for y in X[j]]) for j in range(N) if (i>>j&1)])])))

# Optimized solution
N=int(eval(input()))
X=[0]*N
for i in range(N):
 X[i]=[list(map(int,input().split())) for _ in [0]*int(eval(input()))]
print((max(['{:b}'.format(i).count('1')for i in range(2**N) if all([all([y[1]==i>>(y[0]-1)&1 for y in X[j]]) for j in range(N) if (i>>j&1)])])))
# Original solution
N = int(eval(input()))
ls = []
for i in range(N):
  a = int(eval(input()))
  for _ in range(a):
    x,y = list(map(int, input().split()))
    ls.append((i,x-1,y==1))
max = 0
for i in range(2**N):
  c = 0
  hon = set()
  unhon = set()
  
  for x in range(N):
    if (i>>x)&1 == 1:
      c += 1
      
  for x,y,z in ls:
    if (i>>x)&1 == 1:
      if z:
        hon.add(y)
      else:
        unhon.add(y)
        
  if len(hon & unhon) == 0:
    flag = True
    for n in range(N):
      if (i>>n)&1 == 1:
        if n in unhon:
          flag = False
          break
      else:
        if n in hon:
          flag = False
          break
    if flag and c >= max:
      max = c
      
print(max)

# Optimized solution
N = int(eval(input()))

h = []

for i in range(N):
  m = int(eval(input()))
  g = []
  for j in range(m):
    a, b = list(map(int, input().split()))
    g.append((a-1, b))
  h.append(g)
  
def judge(a, b):
  for i in range(N):
    if (b >> i) & 1:
      for j in a[i]:
        if ((b >> j[0]) & 1) != j[1]:
          return False
  return True
  
x = 0b0
ans = -1
for i in range(2**N):
  if judge(h, x):
    tmp = 0
    for i in range(N):
      if (x >> i) & 1:
        tmp += 1
    if tmp > ans:
      ans = tmp
  x += 1

print(ans)
# Original solution
from collections import defaultdict,deque
n = int(eval(input()))
d = defaultdict(list)
for i in range(n):
    a = int(eval(input()))
    for j in range(a):
        x,y = list(map(int,input().split()))
        d[i].append((x-1,bool(y)))
        
maxi = 0
for i in range(2 ** n):
    honest = [-1]*n
    que = deque([])
    for j in range(n):
        if ((i >> j) & 1):
            que.append(n-1-j)
            honest[n-1-j] = True
    flag = True
    while que and flag:
        v = que.popleft()
        for x,y in d[v]:
            if honest[x] == -1:
                honest[x] = y
                if y:
                    que.append(x)
            elif honest[x] != y:
                flag = False
                break
    if flag:
        maxi = max(maxi,str(bin(i)).count('1'))
print(maxi)

# Optimized solution
def judge(bit):
    global l
    for i in range(n):
        if (bit>>i)&1 == 0:
            continue
        for x,y in l[i]:
            if y==1 and (bit>>x)&1==0:
                return False
            if y==0 and (bit>>x)&1==1:
                return False
    return True

n = int(eval(input()))
l = [[] for _ in range(n)]
for i in range(n):
    a = int(eval(input()))
    for j in range(a):
        x,y = list(map(int,input().split()))
        l[i].append((x-1,y))
maxi = 0
for bit in range(2**n):
    if judge(bit):
        maxi = max(maxi,str(bin(bit)).count('1'))
print(maxi)
# Original solution
from itertools import product
def trueCheck(i,x):
    for j in range(1,N+1):
        if B[i][j]==1:
            if x[j-1]==0:
                return 1
        elif B[i][j]==0:
            if x[j-1]==1:
                return 1
    return 0
N = int(eval(input()))
A = [0]
B = {i:[-1 for _ in range(N+1)] for i in range(1,N+1)}
for i in range(1,N+1):
    A.append(int(eval(input())))
    for _ in range(A[-1]):
        x,y = list(map(int,input().split()))
        B[i][x] = y
cmax = 0
for z in product([0,1],repeat=N):
    flag = 0
    for i in range(1,N+1):
        if z[i-1]==1:
            flag = trueCheck(i,z)            
        if flag==1:break
    if flag==0:
        cmax = max(cmax,sum(z))
print(cmax)               

# Optimized solution
from itertools import product
N = int(eval(input()))
G = {i:[] for i in range(1,N+1)}
for i in range(1,N+1):
    K = int(eval(input()))
    for j in range(K):
        G[i].append(list(map(int,input().split())))
cmax = 0
for z in product((0,1),repeat=N):
    flag = 0
    for i in range(N):
        if z[i]==1:
            ind = i+1
            for [x,y] in G[ind]:
                if z[x-1]==y:continue
                else:
                    flag=1
                    break
            if flag==1:
                break
    if flag==0:
        cmax = max(cmax,sum(z))
print(cmax)
# Original solution
#入力
n=int(eval(input()))
xy=[[list(map(int,input().split())) for _ in range(int(eval(input())))] for _ in range(n)]
#bit全探索
ans=0
for i in range(2**n):
  flag=True         
  for j in range(n):
    if (i>>j)&1:    
      for x,y in xy[j]:#j人目の証言と仮定に矛盾がないか調べる
        if (i>>(x-1))&1!=y:
          flag=False
          break
  if flag==True: 
    ans=max(ans,bin(i)[2:].count('1'))     
#出力
print(ans)

# Optimized solution
n,ans=int(eval(input())),0
xy=[[list(map(int,input().split())) for _ in range(int(eval(input())))] for _ in range(n)]
for i in range(2**n):
  f=True         
  for j in range(n):
    if (i>>j)&1:    
      for x,y in xy[j]:
        if (i>>(x-1))&1!=y:
          f=False
          break
  if f: 
    ans=max(ans,bin(i)[2:].count('1'))     
print(ans)
# Original solution
N=int(eval(input()))
Ins=[[] for _ in range(N)]
ans=0

#bit演算用にx-1
for i in range(N):
  A=int(eval(input()))
  for _ in range(A):
    x,y=list(map(int,input().split()))
    Ins[i].append((x-1,y))

for i in range(2**N):
  flag=1
  honest=[]
  unkind=[]
  for j in range(N):
    if (i>>j)&1:
      honest.append(j)
    else:
      unkind.append(j)
  for k in honest:
    for l in Ins[k]:
      if l[1]==1 and l[0] in unkind:
        flag=0
        break
      elif l[1]==0 and l[0] in honest:
        flag=0
        break
  if flag==1:
    ans=max(ans,len(honest))
print(ans)

# Optimized solution
N=int(eval(input()))
I=[[] for _ in range(N)]
a=0
for i in range(N):
  A=int(eval(input()))
  for _ in range(A):
    x,y=list(map(int,input().split()))
    I[i].append((x-1,y))

for i in range(2**N):
  f=1
  h=[]
  u=[]
  for j in range(N):
    if (i>>j)&1:
      h.append(j)
    else:
      u.append(j)
  for k in h:
    for l in I[k]:
      if l[1]==1 and l[0] in u:
        f=0
        break
      elif l[1]==0 and l[0] in h:
        f=0
        break
  if f==1:
    a=max(a,len(h))
print(a)
# Original solution
def is_right(i):
  trueA =bin(i)[2:].zfill(N)
  for ii,flag in enumerate(trueA):
    if flag == '1':
      for x,y in A[ii]:
        if trueA[x] != str(y):
          return False
  return True

N = int(eval(input()))
A = []
for _ in range(N):
  a = int(eval(input()))
  tmpA = []
  for _ in range(a):
    x,y = list(map(int,input().split()))
    tmpA.append([x-1,y])
  A.append(tmpA)

ans = 0
for i in range(2**N):
  if is_right(i):
    ans = max(ans,bin(i).count('1'))
print(ans)

# Optimized solution
def is_case_possible(case):
    for i, flag in enumerate(case):
        if flag == '1':
            for x, y in XY[i]:
                x -= 1
                if case[x] != str(y):
                    return False
    return True

N = int(eval(input()))
XY = []
for _ in range(N):
    A = int(eval(input()))
    xy = [list(map(int, input().split())) for _ in range(A)]
    XY.append(xy)

ans = 0
for i in range(2**N):
    case = bin(i)[2:].zfill(N)
    if is_case_possible(case):
        ans = max(ans, case.count('1'))
print(ans)
# Original solution
N = int(eval(input()))
data = []
for _ in range(N):
	A = int(eval(input()))
	items = []
	for __ in range(A):
		x, y = list(map(int, input().split()))
		items.append((x - 1, y))
	data.append(items)
 
best = 0
 
def check(i):
    for j in range(N):
        if ((i >> j) & 1) == 1:           
            for x, y in data[j]:
                if y !=((i >> x) & 1):return False						
    return True
 
for i in range(1 << 2**N):
    count=0
    for j in range(N):count += ((i >> j) & 1)
    if count>best:
        if check(i):best = count
	
print(best)

# Optimized solution
N = int(eval(input()))
data = []
for _ in range(N):
	A = int(eval(input()))
	items = []
	for __ in range(A):
		x, y = list(map(int, input().split()))
		items.append((x - 1, y))
	data.append(items)
 
best = 0
 
def check(i):
    for j in range(N):
        if ((i >> j) & 1) == 1:           
            for x, y in data[j]:
                if y !=((i >> x) & 1):return False						
    return True
 
for i in range(2**N):
    count=0
    for j in range(N):count += ((i >> j) & 1)
    if count>best:
        if check(i):best = count
	
print(best)
# Original solution
N = int(eval(input()))
data = []
for _ in range(N):
	A = int(eval(input()))
	items = []
	for __ in range(A):
		x, y = list(map(int, input().split()))
		items.append((x - 1, y))
	data.append(items)
 
best = 0
 
def check(i):
    for j in range(N):
        if ((i >> j) & 1) == 1:           
            for x, y in data[j]:
                if y !=((i >> x) & 1):return False						
    return True
 
for i in range(2**N):
    count=0
    for j in range(N):count += ((i >> j) & 1)
    if count>best:
        if check(i):best = count
	
print(best)

# Optimized solution
N = int(eval(input()))
data = []
for _ in range(N):
	A = int(eval(input()))
	items = []
	for __ in range(A):
		x, y = list(map(int, input().split()))
		items.append((x - 1, y))
	data.append(items)
 
best = 0
 
def check(i):
    for j in range(N):
        if ((i >> j) & 1) == 1:           
            for x, y in data[j]:
                if y !=((i >> x) & 1):return False						
    return True
 
for i in reversed(list(range(0, 2**N))):
    count=0
    for j in range(N):count += ((i >> j) & 1)
    if count>best:
        if check(i):best = count
	
print(best)
# Original solution
import itertools

N = int(eval(input()))

all_list = list(itertools.product([0,1], repeat=N))

xy_list =[]

for i in range(N):
    for j in range(int(eval(input()))):
        x, y = list(map(int, input().split()))
        xy_list.append((i+1,x,y))

#print(xy_list)

num_ok = 0
for i in all_list:
    #どの人の証言なのか
    flag = True

    for j in xy_list:
        if i[j[0]-1] == 1:
            if i[j[1]-1] != j[2]:
                flag = False        
    if flag == True:
        if num_ok < i.count(1):
            num_ok = i.count(1)


print(num_ok)


# Optimized solution

import itertools

N = int(eval(input()))

all_list = list(itertools.product([0,1], repeat=N))

xy_list =[]

for i in range(N):
    for j in range(int(eval(input()))):
        x, y = list(map(int, input().split()))
        xy_list.append((i+1,x,y))

#print(xy_list)

num_ok = 0
for i in all_list:
    #どの人の証言なのか
    flag = True

    for j in xy_list:
        if i[j[0]-1] == 1:
            if i[j[1]-1] != j[2]:
                flag = False        
                break

    if flag == True:
        if num_ok < i.count(1):
            num_ok = i.count(1)


print(num_ok)
# Original solution
from itertools import product

n = int(eval(input()))
data = {}
for p in range(1, n+1):
    a = int(eval(input()))
    # 人p=1～の証言
    data[p] = [list(map(int, input().split())) for _ in range(a)]
    
# パターン生成
ans = 0
for honest in product(list(range(2)), repeat=n):
    for p,hk in enumerate(honest, 1):
        if hk == 1:
            # 証言の矛盾をチェック
            if not all([honest[x-1] == y for x,y in data[p]]):
                break
    else:
        ans = max(ans, sum(honest))

print(ans)

# Optimized solution
from itertools import product

n = int(eval(input()))
info = {}
for p in range(n):
    a = int(eval(input()))
    L = []
    for _ in range(a):
        x,y = list(map(int, input().split()))
        x,y = x-1, y
        L.append((x,y))
    info[p] = L

ans = 0
for bit_pattern in product(list(range(2)), repeat=n):
    for p,bit in enumerate(bit_pattern):
        if bit:
            if not all([bit_pattern[x] == y for x,y in info[p]]):
                break
    else:
        ans = max(ans, sum(bit_pattern))

print(ans)
# Original solution
N = int(eval(input()))

# print("")
# 証言者ごとに整理する
testimony_list = []
for i in range(N):
    array = [-1] * N
    testimony_list.append(array)
for i in range(N):
    A = int(eval(input()))
    for j in range(A):
        # iさんの、xさんへの証言
        x, y = list(map(int, input().split()))
        # print("test:{} {}".format(x, y))
        # iさんの、xさんへの証言
        # print("test:{} {} {}".format(x - 1, i, y))
        # print(testimony_list)
        testimony_list[i][x - 1] = y

# print(testimony_list)
max_count = 0
failed = False
for i in range(2 ** N):
    results = [-1] * N
    shoujiki = 0
    for j in range(len(testimony_list)):
        # check = (i >> j & 1)
        # print("チェック: {} {}".format(i, j))
        # print(i >> j & 1)
        if i >> j & 1:
            shoujiki += 1
            # print("{}:{}".format(bin(i), j))
            array = testimony_list[j]
            for k in range(len(array)):
                # print(
                #     "k={} result[k]:array[k] {}:{}".format(
                #         k, results[k], array[k]))
                # print(i >> k & 1)
                if not (i >> k & 1) and array[k] == 1:
                    # print("矛盾2")
                    failed = True
                    break
                elif (i >> k & 1) and array[k] == 0:
                    # print("矛盾3")
                    failed = True
                    break
                if array[k] == -1:
                    continue
                if results[k] == -1:
                    results[k] = array[k]
                elif results[k] != array[k]:
                    # print("矛盾1")
                    failed = True
                    break
        if failed is True:
            # print("failed")
            # results = [-1] * N
            break
    if failed is True:
        failed = False
        continue
    # print("計算: {}".format(i))
    # print(results)
    # count = 0
    # for result in results:
    #     if result != -1:
    #         count += 1
    # print(count)
    if max_count < shoujiki:
        max_count = shoujiki
print(max_count)


# Optimized solution
N = int(eval(input()))

# 証言者ごとに整理する
testimony_list = []
for i in range(N):
    array = [-1] * N
    testimony_list.append(array)
for i in range(N):
    A = int(eval(input()))
    for j in range(A):
        x, y = list(map(int, input().split()))
        # iさんの、xさんへの証言
        testimony_list[i][x - 1] = y

max_count = 0
for i in range(2 ** N):
    failed = False
    for j in range(N):
        if not (i >> j & 1):
            continue
        array = testimony_list[j]
        for k in range(N):
            if array[k] != -1 and (i >> k & 1) != array[k]:
                failed = True
                break
    if failed is False:
        max_count = max(max_count, bin(i)[2:].count("1"))
print(max_count)
# Original solution
N = int(eval(input()))

# 証言者ごとに整理する
testimony_list = []
for i in range(N):
    array = [-1] * N
    testimony_list.append(array)
for i in range(N):
    A = int(eval(input()))
    for j in range(A):
        x, y = list(map(int, input().split()))
        # iさんの、xさんへの証言
        testimony_list[i][x - 1] = y

max_count = 0
for i in range(2 ** N):
    failed = False
    for j in range(N):
        if not (i >> j & 1):
            continue
        array = testimony_list[j]
        for k in range(N):
            if array[k] != -1 and (i >> k & 1) != array[k]:
                failed = True
                break
    if failed is False:
        max_count = max(max_count, bin(i)[2:].count("1"))
print(max_count)


# Optimized solution
N = int(eval(input()))

# 証言者ごとに整理する
testimony_list = []
for i in range(N):
    array = [-1] * N
    testimony_list.append(array)
for i in range(N):
    A = int(eval(input()))
    for j in range(A):
        x, y = list(map(int, input().split()))
        # iさんの、xさんへの証言
        testimony_list[i][x - 1] = y

max_count = 0
for i in range(2 ** N):
    failed = False
    for j in range(N):
        if not (i >> j & 1):
            continue
        array = testimony_list[j]
        for k in range(N):
            if array[k] == -1:
                continue
            if (i >> k & 1) != array[k]:  # 正直者に対して不親切 or 不親切に対して正直者と証言
                failed = True
                break
    if not failed:
        # 「0b010110」の「0b」を除外して1の数をカウント
        max_count = max(max_count, bin(i)[2:].count("1"))
print(max_count)
# Original solution
#入力はn人のx,yに分けないといけない
n = int(eval(input()))
a = []
x = [[] for i in range(n)]
y = [[] for i in range(n)]
for i in range(n):
    a.append(int(eval(input())))
    for j in range(a[i]):
        xx, yy = (int(i) for i in input().split())
        x[i].append(xx)
        y[i].append(yy)

testimony = [[2]*n for i in range(n)]

for i in range(n):
    for j in range(a[i]):
        if (y[i][j] == 1):
            testimony[i][x[i][j] - 1] = 1#正直者ならtestimonyのxの位置に正直者である1を置く
        elif(y[i][j] == 0):
            testimony[i][x[i][j]-1] = 0#さっきの反対

ans = 0
for i in range(2**n):#2**n通りの「正直者」と「不親切な人」の全パターンを列挙
    bit_list = []
    for j in range(n):
        if ((i >> j) & 1):
            bit_list.append(1)#正直者なら
        else:
            bit_list.append(0)
    flag = 1
    #列挙した中からtestimony[k][l]と一致するのを探し、さらにその中からbit_listの最大値を求める
    for k in range(n):
        if(bit_list[k] == 1):
            for l in range(n):
                if(testimony[k][l] != 2):#２(デフォルト状態じゃないとき)
                    if(testimony[k][l] != bit_list[l]): #yの人の証言と食い違っていたらflagを0にする
                        flag = 0
                        break
    
    if(flag == 1):
        ans = max(sum(bit_list),ans)
print(ans)

# Optimized solution
n = int(eval(input()))
#2**n通りの正直者を全列挙してそれを矛盾が生じないか試していき最大値を求める 競合してる証言をピック　True or False で判断する
jud = [[-1 for i in range(n)] for j in range(n)]
xy = []
ayasi = []
for i in range(n):
    a = int(eval(input()))
    for j in range(a):
        x,y = list(map(int,input().split()))
        jud[i][x-1] = y
Max = 0
for i in range(2**n):
    li = []
    flag = True
    cnt = 0
    for j in range(n):
        if ((i >> j) & 1):
            li.append(1)

        else:
            li.append(0)
    for k in range(n):
        if li[k] == 1:
         for l in range(n):
             if jud[k][l] != -1:
                 if jud[k][l] != li[l]:
                     flag = False
                     break

    if flag:
        Max = max(sum(li),Max)
print(Max)
# Original solution
import itertools

N = int(eval(input()))

syougen_list = []
people = [-1] * N
for i in range(N):
    a_i = int(eval(input()))
    a_i_list = []
    for j in range(a_i):
        a_i_list.append(list(map(int, input().split())))
    syougen_list.append(a_i_list)


output = 0
for i in itertools.product([1,0], repeat=N):
    legal = True
    for index, j in enumerate(i):
        if j == 1:
            syougen = syougen_list[index]
            for k in syougen:
                if i[k[0] - 1] != k[1]:
                    legal = False
                    break
    if not legal:
        continue

    match = True
    honest_syougen_list = []
    for index, j in enumerate(i):
        if j == 1:
            honest_syougen_list += syougen_list[index]
    for j in honest_syougen_list:
        if people[j[0] - 1] == -1:
            people[j[0] - 1] = j[1]
        elif people[j[0] - 1] != j[1]:
            match = False
            break
    if match:
        number = i.count(1)
        if number >= output:
            output = number

print(output)

# Optimized solution
import itertools

N = int(eval(input()))

syougen_list = []
for i in range(N):
    a_i = int(eval(input()))
    a_i_list = []
    for j in range(a_i):
        a_i_list.append(list(map(int, input().split())))
    syougen_list.append(a_i_list)


output = 0
for i in itertools.product([1,0], repeat=N):
    legal = True
    for index, j in enumerate(i):
        if j == 1:
            syougen = syougen_list[index]
            for k in syougen:
                if i[k[0] - 1] != k[1]:
                    legal = False
                    break
            if not legal:
                break
    if legal:
        number = i.count(1)
        if number >= output:
            output = number

print(output)
# Original solution
n=int(eval(input()))
a=[[list(map(int,input().split()))for _ in'_'*int(eval(input()))]for _ in'_'*n]
m=0
for i in range(2**n):
  *s,=list(map(int,bin(i)[2:].zfill(n)))
  f=1
  for j,t in enumerate(a):
    if s[~j]:
      for x,y in t:f&=s[-x]==y
  m=max(m,sum(s)*f)
print(m)

# Optimized solution
i=input
n=int(i())
a=eval('[list(map(int,i().split()))for _ in"_"*int(i())],'*n)
print((max(all(y==i>>x-1&1for j,t in enumerate(a)if i>>j&1for x,y in t)*bin(i).count('1')for i in range(2**n))))