#include <bits/stdc++.h>
using namespace std;
int f[109];
int main() {
  int n, x, v;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> v;
    for (int i = 0; i < v; ++i) {
      cin >> x;
      ++f[x];
    }
  }
  for (int i = 1; i <= 100; ++i)
    if (f[i] == n) cout << i << ' ';
  return 0;
}
