#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  int n;
  cin >> n;
  vector<unordered_set<int>> vs;
  for (int i = 0; i < (n); ++i) {
    int r;
    unordered_set<int> set;
    cin >> r;
    for (int j = 0; j < (r); ++j) {
      int x;
      cin >> x;
      set.insert(x);
    }
    vs.push_back(set);
  }
  for (int i = 1; i < (101); ++i) {
    bool inAll = true;
    for (unordered_set<int> s : vs) {
      if (s.find(i) == s.end()) {
        inAll = false;
      }
    }
    if (inAll) {
      cout << i << " ";
    }
  }
  cout << endl;
  return 0;
}
