#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  vector<vector<int> > stops(n);
  for (int i = 0; i < n; ++i) {
    int r;
    cin >> r;
    stops[i].resize(r);
    for (int j = 0; j < r; ++j) {
      cin >> stops[i][j];
    }
    sort(stops[i].begin(), stops[i].end());
  }
  vector<int> ans;
  for (int i = 1; i < 101; ++i) {
    int flag = 1;
    for (int j = 0; j < stops.size(); ++j) {
      auto it = lower_bound(stops[j].begin(), stops[j].end(), i);
      if (it == stops[j].end() || *it != i) {
        flag = 0;
        break;
      }
    }
    if (flag) ans.push_back(i);
  }
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
