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