#include <bits/stdc++.h>
int main() {
  int n, o, i;
  scanf("%d", &n);
  int a[n + 2][101];
  for (o = 0; o < n; o++) {
    int r, j, k;
    scanf("%d", &r);
    for (j = 0; j < r; j++) {
      scanf("%d", &k);
      a[o][k] = 1;
    }
  }
  int j;
  for (j = 1; j <= 100; j++) {
    int p = 0, q;
    q = a[0][j];
    if (q == 0) continue;
    for (i = 0; i < n; i++) {
      if (a[i][j] == q) p++;
    }
    if (p == n) {
      printf("%d ", j);
    }
  }
  printf("\n");
}
