#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, r, x;
  cin >> n;
  int count[101] = {0};
  for (int i = 0; i < n; i++) {
    cin >> r;
    while (r--) {
      cin >> x;
      count[x]++;
    }
  }
  for (int i = 1; i <= 100; i++) {
    if (count[i] == n) cout << i << " ";
  }
}
