#include <bits/stdc++.h>
using namespace std;
inline int myrand(int l, int r) {
  int ret = rand();
  ret <<= 15;
  ret ^= rand();
  if (ret < 0) ret = -ret;
  ret %= (r - l + 1);
  ret += l;
  return ret;
}
template <typename F, typename S>
ostream &operator<<(ostream &os, const pair<F, S> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
using min_pq = std::priority_queue<T, vector<T>, greater<T> >;
const int maxn = 110;
int cnt[maxn];
int32_t main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int r;
    cin >> r;
    while (r--) {
      int x;
      cin >> x;
      cnt[x]++;
    }
  }
  for (int i = 1; i <= 100; i++) {
    if (cnt[i] == n) {
      cout << i << ' ';
    }
  }
  cout << '\n';
}
