#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  map<int, int> ans;
  for (int(i) = 0; (i) < (n); (i)++) {
    int t;
    cin >> t;
    int((a)[(t)]);
    for (int i = 0; i < (t); i++) cin >> ((a)[i]);
    for (int(i) = 0; (i) < (t); (i)++) ans[a[i]]++;
  }
  for (int(i) = (1); (i) < (101); (i)++)
    if (ans[i] == n) cout << i << " ";
  return 0;
}
