#include <bits/stdc++.h>
#pragma CCC optimize("O3,unroll-loops, Ofast")
#pragma GCC target(sse, sse2, sse3, ssse3, sse4, popcnt, tune = native)
#pragma GCC optimize(                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           \
    "-fdelete-null-pointer-checks,inline-functions-called-once,-funsafe-loop-optimizations,-fexpensive-optimizations,-foptimize-sibling-calls,-ftree-switch-conversion,-finline-small-functions,inline-small-functions,-frerun-cse-after-loop,-fhoist-adjacent-loads,-findirect-inlining,-freorder-functions,no-stack-protector,-fpartial-inlining,-fsched-interblock,-fcse-follow-jumps,-fcse-skip-blocks,-falign-functions,-fstrict-overflow,-fstrict-aliasing,-fschedule-insns2,-ftree-tail-merge,inline-functions,-fschedule-insns,-freorder-blocks,-fwhole-program,-funroll-loops,-fthread-jumps,-fcrossjumping,-fcaller-saves,-fdevirtualize,-falign-labels,-falign-loops,-falign-jumps,unroll-loops,-fsched-spec,-ffast-math,Ofast,inline,-fgcse,-fgcse-lm,-fipa-sra,-ftree-pre,-ftree-vrp,-fpeephole2", \
    3)
int allocator_pos = 0;
char allocator_memory[(int)2e8];
inline void *operator new(size_t n) {
  char *res = allocator_memory + allocator_pos;
  allocator_pos += n;
  return (void *)res;
}
inline void operator delete(void *) noexcept {}
using namespace std;
mt19937 rnd(time(0));
long long gcd(long long a, long long b) {
  if (!b)
    return a;
  else
    return gcd(b, a % b);
}
long long gcm(long long a, long long b) { return a * b / gcd(a, b); }
const long long N = 1e5 + 10, INF = 1e9;
long long a[N], kol[N];
void solve() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long num;
    cin >> num;
    for (long long j = 0; j < num; j++) {
      long long x;
      cin >> x;
      kol[x]++;
    }
  }
  for (long long i = 1; i <= 100; i++) {
    if (kol[i] >= n) {
      cout << i << " ";
    }
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
