#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(100, 0);
  int t = n;
  while (n--) {
    int r;
    cin >> r;
    for (int i = 0; i < r; i++) {
      int x;
      cin >> x;
      v[x - 1]++;
    }
  }
  for (int i = 0; i < 100; i++) {
    if (v[i] == t) {
      cout << i + 1 << " ";
    }
  }
}
