#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int st[100] = {0};
  set<int> track;
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m;
    for (int j = 0; j < m; j++) {
      int x;
      cin >> x;
      st[x - 1] += 1;
      track.insert(x);
    }
  }
  int count = 0;
  for (auto j = track.begin(); j != track.end(); j++) {
    if (st[*j - 1] == n) {
      cout << *j << " ";
    }
  }
  return 0;
}
