#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
inline long long readl() {
  long long x = 0, f = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * f;
}
int power(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = ans * a;
    b >>= 1;
    a = a * a;
  }
  return ans;
}
int power_mod(int a, int b, int mod) {
  a %= mod;
  int ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % mod;
    b >>= 1, a = (a * a) % mod;
  }
  return ans;
}
long long powerl(long long a, long long b) {
  long long ans = 1ll;
  while (b) {
    if (b & 1ll) ans = ans * a;
    b >>= 1ll;
    a = a * a;
  }
  return ans;
}
long long power_modl(long long a, long long b, long long mod) {
  a %= mod;
  long long ans = 1ll;
  while (b) {
    if (b & 1ll) ans = (ans * a) % mod;
    b >>= 1ll, a = (a * a) % mod;
  }
  return ans;
}
long long gcdl(long long a, long long b) { return b == 0 ? a : gcdl(b, a % b); }
long long abssl(long long a) { return a > 0 ? a : -a; }
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int abss(int a) { return a > 0 ? a : -a; }
long long m, n;
bitset<10000 + 5> bs[55];
int main() {
  cin >> m >> n;
  for (long long len, i = 1; i <= m; ++i) {
    scanf("%lld", &len);
    for (long long x, j = 1; j <= len; ++j) {
      scanf("%lld", &x);
      bs[i].set(x - 1);
    }
  }
  for (long long i = 1; i <= m; ++i) {
    for (long long j = 1; j <= m; ++j)
      if (i != j) {
        if ((bs[i] & bs[j]).none()) return printf("impossible\n"), 0;
      }
  }
  printf("possible\n");
  return 0;
}
