#include <bits/stdc++.h>
using namespace std;
int main() {
  int stops[101];
  int n, s, k;
  for (int i = 0; i < 101; i++) {
    stops[i] = 0;
  }
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &s);
    for (int j = 0; j < s; j++) {
      scanf("%d", &k);
      stops[k]++;
    }
  }
  for (int i = 0; i < 101; i++) {
    if (stops[i] == n) {
      printf("%d ", i);
    }
  }
  printf("\n");
  return 0;
}
