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