#include <bits/stdc++.h>
using namespace std;
long long mark[101];
int32_t main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    for (long long j = 0; j < x; j++) {
      long long w;
      cin >> w;
      mark[w]++;
    }
  }
  for (long long i = 1; i < 101; i++) {
    if (mark[i] == n) {
      cout << i << endl;
    }
  }
}
