#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[101] = {
      0,
  };
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int t;
    scanf("%d", &t);
    for (int j = 0; j < t; j++) {
      int tmp;
      scanf("%d", &tmp);
      arr[tmp]++;
    }
  }
  for (int i = 1; i <= 100; i++) {
    if (arr[i] == n) printf("%d ", i);
  }
}
