#include <bits/stdc++.h>
using namespace std;
void solve() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int check[105];
  memset(check, 0, sizeof check);
  int n, k, t;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> k;
    for (long long j = 0; j < k; j++) {
      cin >> t;
      check[t]++;
    }
  }
  for (long long i = 1; i <= 100; i++) {
    if (check[i] == n) cout << i << " ";
  }
}
int main() {
  solve();
  return 0;
}
