#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, n, r, S, Z, s1, s2, s3, s4, s5, s6, s7, s8, x, y, z, m, j, l, k,
      t;
  long long a[500005];
  long long b[300045];
  long long c[300001];
  long long d[100001];
  long long e[101][101];
  pair<long long, long long> aa[200001];
  pair<long long, long long> bb[200001];
  double h, w, u, v, uu, vv;
  string q1;
  string q2;
  string q3;
  string q4;
  string s;
  string q;
  string sq[50005];
  string qs[3001];
  map<string, long long> g;
  map<string, long long>::iterator it;
  cin >> n;
  for (i = 1; i <= 100; i++) {
    b[i] = 0;
  }
  for (l = 1; l <= n; l++) {
    cin >> m;
    for (i = 1; i <= m; i++) {
      cin >> x;
      b[x]++;
    }
  }
  for (i = 1; i <= 100; i++) {
    if (b[i] == n) cout << i << " ";
  }
}
