#include <bits/stdc++.h>
using namespace std;
int arr[102];
int Main() {
  int n, r;
  scanf("%d", &n);
  for (int i = 0, a; i < n; ++i) {
    scanf("%d", &r);
    for (int j = 0; j < r; ++j) {
      scanf("%d", &a);
      arr[a] += 1;
    }
  }
  for (int i = 0; i < 102; i++)
    if (arr[i] == n) printf("%d ", i);
  return 0;
}
int main() {
  int test = 1;
  while (test--) Main();
  return 0;
}
