#include <bits/stdc++.h>
using namespace std;
int c[100];
int main() {
  int n, k, a;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> k;
    for (int j = 1; j <= k; j++) {
      cin >> a;
      c[a]++;
    }
  }
  for (int i = 1; i <= 100; i++) {
    if (c[i] == n) cout << i << " ";
  }
  return 0;
}
