#include <bits/stdc++.h>
using namespace std;
const int BUF = 1000000;
char buf[BUF], *p1, *p2;
inline char getChar() {
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, BUF, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline int read() {
  register int f = 0;
  char c;
  while (!isdigit(c = getChar())) {
  }
  do f = f * 10 + (c ^ 48);
  while (isdigit(c = getChar()));
  return f;
}
const int maxN = 100003;
bitset<maxN> s[53], tmp;
int main() {
  int m = read(), n = read(), k, i;
  for (i = 1; i <= m; ++i)
    for (k = read(); k; --k) s[i].set(read());
  bool flag = 1;
  for (i = 1; i <= m; ++i)
    for (k = i + 1; k <= m; ++k) {
      tmp = s[i] & s[k];
      if (!tmp.any()) flag = 0;
    }
  printf(flag ? "possible\n" : "impossible");
  return 0;
}
