import sys import io, os input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline mod = 998244353 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<