#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  int mm = 101;
  scanf("%d", &t);
  vector<int> ar(mm, 0);
  int t1 = t;
  while (t--) {
    int r, r1;
    scanf("%d", &r);
    for (int i = 0; i < r; i++) {
      scanf("%d", &r1);
      ar[r1] += 1;
    }
  }
  for (int i = 0; i < 101; i++) {
    if (ar[i] == t1) cout << i << " ";
  }
  return 0;
}
