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