#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9;
const long long N = 1e2 + 1;
const long long mod = 1e9 + 7;
const long double eps = 1E-7;
int n, k, x, a[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> k;
    while (k--) {
      cin >> x;
      a[x]++;
    }
  }
  for (int i = 1; i < N; i++) {
    if (a[i] == n) cout << i << " ";
  }
}
