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