#include <bits/stdc++.h>
using namespace std;
int co[105];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m;
    while (m--) {
      int x;
      cin >> x;
      co[x]++;
    }
  }
  for (int i = 1; i < 105; i++)
    if (co[i] == n) cout << i << " ";
  return 0;
}
