Arkady's morning seemed to be straight of his nightmare. He overslept through the whole morning and, still half-asleep, got into the tram that arrived the first. Some time after, leaving the tram, he realized that he was not sure about the line number of the tram he was in.

During his ride, Arkady woke up several times and each time he saw the tram stopping at some stop. For each stop he knows which lines of tram stop there. Given this information, can you help Arkady determine what are the possible lines of the tram he was in?


-----Input-----

The first line contains a single integer $n$ ($2 \le n \le 100$) — the number of stops Arkady saw.

The next $n$ lines describe the stops. Each of them starts with a single integer $r$ ($1 \le r \le 100$) — the number of tram lines that stop there. $r$ distinct integers follow, each one between $1$ and $100$, inclusive, — the line numbers. They can be in arbitrary order.

It is guaranteed that Arkady's information is consistent, i.e. there is at least one tram line that Arkady could take.


-----Output-----

Print all tram lines that Arkady could be in, in arbitrary order.


-----Examples-----
Input
3
3 1 4 6
2 1 4
5 10 5 6 4 1

Output
1 4 

Input
5
1 1
10 10 9 8 7 100 5 4 3 99 1
5 1 2 3 4 5
5 4 1 3 2 5
4 10 1 5 3

Output
1 



-----Note-----

Consider the first example. Arkady woke up three times. The first time he saw a stop with lines $1$, $4$, $6$. The second time he saw a stop with lines $1$, $4$. The third time he saw a stop with lines $10$, $5$, $6$, $4$ and $1$. He can be in a tram of one of two lines: $1$ or $4$.

Difficulty: interview

Starter code:

Solutions:
n = int(input())
d = {}
for i in range(n):
    s = input().split()
    for j in range(int(s[0])):
        d[s[j+1]] = d.get(s[j+1],0)+1
ans = ""
for x in d:
    if d[x] == n:
        ans += str(x) + ' '
print(ans.strip())


n = int(input())
res = None
for i in range(n):
    its = [int(k) for k in input().split()]
    s = set(its[1:])
    if res is None:
        res = s
    else:
        res &= s
print(*res)


def main():
    n = int(input())
    d = dict()
    for i in range(n):
        arr = list(map(int, input().split()))[1:]
        for j in arr:
            if (j not in d):
                d[j] = 0
            d[j] += 1
    for t in d.keys():
        if (d[t] == n):
            print(t, end = " ")
main()

def read():
    return set(list(map(int, input().split()))[1:])

n = int(input())
t = read()
for _ in range(n - 1):
    t = t & read()

for x in t:
    print(x, end=' ')
print()


n = int(input())

lines = [0 for _ in range(101)]

for _ in range(n):
    l, *line = list(map(int, input().strip().split()))
    for v in line:
        lines[v] += 1

maxv = 0
ans = []
for index, line in enumerate(lines):
    if line > maxv:
        ans = [index]
        maxv = line
    elif line == maxv:
        ans.append(index)

print(*ans)

#      
import collections, atexit, math, sys, bisect 

sys.setrecursionlimit(1000000)
def getIntList():
    return list(map(int, input().split()))    

try :
    #raise ModuleNotFoundError
    import numpy
    def dprint(*args, **kwargs):
        #print(*args, **kwargs, file=sys.stderr)
        # in python 3.4 **kwargs is invalid???
        print(*args,  file=sys.stderr)
    dprint('debug mode')
except Exception:
    def dprint(*args, **kwargs):
        pass



inId = 0
outId = 0
if inId>0:
    dprint('use input', inId)
    sys.stdin = open('input'+ str(inId) + '.txt', 'r') #标准输出重定向至文件
if outId>0:
    dprint('use output', outId)
    sys.stdout = open('stdout'+ str(outId) + '.txt', 'w') #标准输出重定向至文件
    atexit.register(lambda :sys.stdout.close())     #idle 中不会执行 atexit
    
N, = getIntList()
#print(N)
s0 = set()
for i in range(N):
    za = getIntList()
    ss = set(za[1:])
    if len(s0) ==0:
        s0 = ss
    else:
        s0&= ss
for x in s0:
    print(x,end= ' ')





import sys

input = sys.stdin.readline

n = int(input())

count = {}
for i in range(n):
    a = set(list(map(int, input().split()))[1:])
    for j in a:
        if j not in count.keys():
            count[j] = 0
        count[j] += 1

ans = []
for key in count.keys():
    if count[key] == n:
        ans.append(key)

print(" ".join([str(x) for x in ans]))

n = int(input())

cnt = [0] * 101

for x in range(n):
    lst = [int(y) for y in input().split()]

    for i in range(1, len(lst)):
        cnt[lst[i]] += 1

for x in range(1, 101):
    if cnt[x] == n:
        print(x, end = ' ')
    



n = int(input())
answer = set(list(map(int, input().split()))[1:])

for i in range(n - 1):
    arr = list(map(int, input().split()))[1:]

    buff = set(arr)
    answer = answer.intersection(buff)

print(*answer)

n = int(input())
myset = set()
for i in range(n):
    s = list(map(int, input().split()))
    r, s = s[0], s[1:]
    if i == 0:
        myset = set(s)
    else:
        myset &= set(s)
print(' '.join(map(str, myset)))

# map(int, input().split())
# int(input())
n = int(input())
s = set(range(1, 101))
for i in range(n):
	curr = set(list(map(int, input().split()))[1:])
	scp = s
	s = set()
	for el in scp:
		if el in curr:
			s.add(el)

for el in s:
	print(el, end=" ")
print()



n = int(input())
a = set(range(1,101))
for i in range(n):
    a.intersection_update(set(map(int, input().split()[1:])))
    
for e in a:
    print(e, end = " ")


n=int(input())
a=set(list(map(int,input().split()))[1:])
for i in range(n-1):
    a=a&set(list(map(int,input().split()))[1:])
out=""
for guy in a:
    out+=str(guy)+" "
print(out[:-1])

n = int(input())
c=[0]*200
for i in range(n):
    a=list(map(int, input().split()))
    for i in range(1, len(a)):
        c[a[i]]+=1
for i in range(len(c)):
    if c[i]==n:
        print(i, end=' ')

n = int(input())
arr = input().split()[1:]
ans = set(arr)
for i in range(n - 1):
    arr = input().split()[1:]
    ans &= set(arr)
print(' '.join(ans))


n = int(input())
s = set(map(int, input().split()[1:]))
for i in range(n-1):
    s = s.intersection(map(int, input().split()[1:]))
print(" ".join(map(str, s)))

d=dict()
for i in range(1,101):
    d[i]=0
n=int(input())
for _ in range(n):
    a=list(map(int,input().split()))
    for i in range(1,len(a)):
        d[a[i]]+=1
for i in range(1,101):
    if d[i]==n:
        print(i,end=" ")

n = int(input().strip())
ans = set(list(range(1, 101)))
for _ in range(n):
    stops = [ int(x) for x in input().strip().split()]
    r = stops[0]
    ans = ans.intersection(set(stops[1:]))

for s in ans:
    print(s, end=' ')
print("")


n = int(input())
A = {}
B = {}
for i in range(n):
    if A:
        B = set(list(map(int, input().split()))[1:])
        A &= B
    else:
        A = set(list(map(int, input().split()))[1:])
print(' '.join(map(str, A)))

n=int(input())
R=[list(map(int,input().split())) for i in range(n)]

SET=set(R[0][1:])

for i in range(1,n):
    SET=SET & set(R[i][1:])

for s in SET:
    print(s,end=" ")


from sys import stdin
n=int(stdin.readline().strip())

s=set(list(map(int,stdin.readline().strip().split()))[1::])
for i in range(n-1):
    s1=set(list(map(int,stdin.readline().strip().split()))[1::])
    s2=set()
    for i in s1:
        if i in s:
            s2.add(i)
    s=s2.copy()
print(*list(s))


from bisect import bisect_right as br
from bisect import bisect_left as bl
from collections import defaultdict
from itertools import combinations
import sys
import math
MAX = sys.maxsize
MAXN = 10**5+10
MOD = 10**9+7
def isprime(n):
    n = abs(int(n))
    if n < 2:
        return False
    if n == 2: 
        return True    
    if not n & 1: 
        return False
    for x in range(3, int(n**0.5) + 1, 2):
        if n % x == 0:
            return False
    return True

def mhd(a,b,x,y):
    return abs(a-x)+abs(b-y)

def numIN():
    return(list(map(int,sys.stdin.readline().strip().split())))

def charIN():
    return(sys.stdin.readline().strip().split())

n = int(input())
x = [0]*1000

for _ in range(n):
	l = list(numIN())
	for i in l[1:]:
		x[i]+=1
z = []
for i in range(1000):
	if x[i]==n:
		z.append(str(i))

print(' '.join(z))




n=int(input())
a=[0]*101
for i in range(n):
    b=[int(x) for x in input().split()]
    for j in range(1,len(b)):
        a[b[j]]+=1
for i in range(len(a)):
    if a[i]==n:
        print(i,end=" ")
print()