#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
struct Vector {
  double x, y, z;
} xyz[100100];
Vector operator+(const Vector &a, const Vector &b) {
  return (Vector){a.x + b.x, a.y + b.y, a.z + b.z};
}
Vector operator-(const Vector &a, const Vector &b) {
  return (Vector){a.x - b.x, a.y - b.y, a.z - b.z};
}
Vector operator*(const Vector &a, const double &b) {
  return (Vector){a.x * b, a.y * b, a.z * b};
}
Vector operator/(const Vector &a, const double &b) {
  return (Vector){a.x / b, a.y / b, a.z / b};
}
Vector operator^(const Vector &a, const Vector &b) {
  return (Vector){a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z,
                  a.x * b.y - a.y * b.x};
}
double operator&(const Vector &a, const Vector &b) {
  return a.x * b.x + a.y * b.y + a.z * b.z;
}
inline double len(Vector a) { return sqrt(a & a); }
inline double getV(Vector a, Vector b, Vector c) { return a & (b ^ c); }
inline double getA(Vector a, Vector b, Vector c) {
  Vector x = a ^ c, y = a ^ b;
  return acos(x & y / len(x) / len(y));
}
int n, m, hsh[100100], ans;
int main() {
  n = read();
  int a;
  for (int i = 1; i <= n; i++) {
    m = read();
    while (m--) hsh[read()]++;
  }
  for (int i = 1; i <= 100; i++)
    if (hsh[i] == n) cout << i << " ";
}
