#include <bits/stdc++.h>
using namespace std;
const int OO = (int)1e9;
int dx[8] = {0, 0, -1, 1, 1, 1, -1, -1};
int dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};
long long n, x, y;
bool ok;
map<long long, long long> cnt;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    for (int j = 0; j < x; j++) {
      cin >> y;
      cnt[y]++;
    }
  }
  for (int i = 1; i <= 100; i++) {
    if (cnt[i] == n) {
      cout << i << " ";
    }
  }
  return 0;
}
