#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r;
  cin >> n;
  int rep[101] = {0};
  for (int i = 0; i < n; i++) {
    int x, j;
    cin >> x;
    for (int j = 0; j < x; j++) {
      cin >> r;
      rep[r]++;
    }
  }
  for (int i = 0; i < 101; i++) {
    if (rep[i] == n) {
      cout << i << " ";
    }
  }
  return 0;
}
