#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int main() {
  int n, a, m, t;
  scanf("%d", &n);
  t = n;
  while (n--) {
    scanf("%d", &m);
    for (int i = 0; i < m; i++) {
      scanf("%d", &a);
      mp[a]++;
    }
  }
  for (int i = 1; i <= 100; i++) {
    if (mp[i] == t) printf("%d ", i);
  }
  return 0;
}
