#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int inf = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 7;
int n;
int q[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int k;
    scanf("%d", &k);
    while (k--) {
      int a;
      scanf("%d", &a);
      q[a]++;
    }
  }
  for (int i = 1; i <= 100; i++) {
    if (q[i] == n) {
      cout << i << " ";
    }
  }
  cout << endl;
  return 0;
}
