#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, t;
  cin >> n;
  t = n;
  long long fre[105] = {};
  while (n--) {
    long long s;
    cin >> s;
    for (long long i = 0; i < s; i++) {
      long long a;
      cin >> a;
      fre[a]++;
    }
  }
  for (long long i = 1; i <= 100; i++) {
    if (fre[i] == t) cout << i << " ";
  }
}
