import sys import io, os input = sys.stdin.buffer.readline #input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline def main(): n = int(input()) C = [] for i in range(n): temp = list(map(int, input().split())) temp = temp[1:] if temp: temp = [i-1 for i in temp] v = 0 for i in temp: v |= (1<