#include <bits/stdc++.h>
using namespace std;
const int MAXN = 101;
int n;
int cnt[MAXN];
void init() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout.tie(nullptr);
  cout.precision(12);
  cout << fixed;
}
bool read() {
  if (!(cin >> n)) return 0;
  memset(cnt, 0, sizeof cnt);
  for (int i = 0; i < n; i++) {
    int r;
    cin >> r;
    for (int j = 0; j < r; j++) {
      int cur;
      cin >> cur;
      ++cnt[cur];
    }
  }
  return 1;
}
void solve() {
  for (int r = 0; r < MAXN; r++)
    if (cnt[r] == n) cout << r << " ";
  cout << endl;
}
int main() {
  while (read()) solve();
  return 0;
}
