#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    int a[100] = {0};
    for (long long i = 0, _n = (n); i < _n; i++) {
      long long x;
      cin >> x;
      for (long long j = 0, _n = (x); j < _n; j++) {
        long long temp;
        cin >> temp;
        a[temp - 1]++;
      }
    }
    for (long long i = 0, _n = (100); i < _n; i++) {
      if (a[i] == n) {
        cout << i + 1 << " ";
      }
    }
  }
}
