#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
  for (auto& i : v) is >> i;
  return is;
}
template <typename T>
ostream& operator<<(ostream& os, vector<T>& v) {
  for (auto& i : v) os << i << ' ';
  return os;
}
template <typename T, typename U>
istream& operator>>(istream& is, pair<T, U>& p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T, typename U>
ostream& operator<<(ostream& os, pair<T, U>& p) {
  os << p.first << ' ' << p.second;
  return os;
}
int main() {
  int n;
  cin >> n;
  vector<int> c(200, 0);
  for (int i = 0; i < n; ++i) {
    int r;
    cin >> r;
    for (int j = 0; j < r; ++j) {
      int k;
      cin >> k;
      ++c[k];
    }
  }
  for (int i = 0; i < c.size(); ++i) {
    if (c[i] == n) {
      cout << i << ' ';
    }
  }
  cout << '\n';
  return 0;
}
