#include <bits/stdc++.h>
using namespace std;
long long int ar[202112], br[210226];
bool visit[1000006];
long long int least_prime[1000006];
vector<long long int> vec;
map<long long int, long long int> has;
bool prime[10000006];
void LeastPrimeFactor() {
  long long int tot = 100003;
  least_prime[1] = 1;
  for (long long int i = 2; i < tot; i += 2) least_prime[i] = 2;
  for (long long int i = 3; i < tot; i += 2) {
    if (!visit[i]) {
      least_prime[i] = i;
      for (long long int j = i; (j * i) < tot; j += 2) {
        if (!visit[j * i]) {
          visit[j * i] = true;
          least_prime[j * i] = i;
        }
      }
    }
  }
}
int main() {
  long long int t, n, i, j, m, k, c,
      res = 0, ans = 0, d, p, e, a, b, dis, l, v, q, r, sum, zero, one,
      flag = 0, test, s, x, y, z, maxm = 0LL, u, strt, en, minm = 99999999999LL,
      len, flag1, flag2, white, black;
  string str, ptr;
  str = "";
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  map<long long int, long long int>::iterator it, jt;
  cin >> n;
  c = 0;
  for (i = 0; i < n; i++) {
    cin >> r;
    for (j = 0; j < r; j++) {
      cin >> a;
      has[a]++;
    }
  }
  for (i = 1; i <= 100; i++) {
    if (has[i] == n) {
      cout << i << " ";
    }
  }
  return 0;
}
