CF1056A Determine Line
题目描述
Arkady半梦半醒坐上了一趟电车,在他下了电车后,发现他不知道自己坐的是几号电车。
在他的旅程中,他醒了几次,每次都看到电车停靠在某个站点,并且他知道在这个站点停靠的电车都有哪些。
他想让你帮他确认他可能坐的是几号电车。
输入格式
第一行一个$n$($1\le n\le 100$),他一共看到停靠了几次。
以下$n$行,每行第一个数$r$($1\le r\le 100$),表示在该站点停靠的电车有多少个。
接下来的$r$个数,表示在该站点停靠的电车编号。
电车编号在$1$到$100$之间。
输出格式
以任意顺序输出他所有可能乘坐的电车编号。
说明/提示
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 $ .