#include <bits/stdc++.h>
using namespace std;
int main() {
  int stops, lines, frequency[101];
  cin >> stops;
  for (int i = 1; i < 101; ++i) frequency[i] = 0;
  for (int i = 0; i < stops; ++i) {
    cin >> lines;
    int Array[lines];
    for (int j = 0; j < lines; ++j) {
      cin >> Array[j];
      ++frequency[Array[j]];
    }
  }
  for (int i = 1; i < 101; ++i) {
    if (frequency[i] == stops) cout << i << " ";
  }
  return 0;
}
