#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  map<int, int> cnt;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    for (int j = 0; j < x; j++) {
      int y;
      cin >> y;
      cnt[y]++;
    }
  }
  vector<int> vec;
  for (int i = 1; i <= 100; i++) {
    if (cnt[i] == n) {
      vec.push_back(i);
    }
  }
  for (int x : vec) {
    cout << x << " ";
  }
}
