#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int f = 1, x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
bitset<10000> b[60];
int main() {
  int m = read(), n = read();
  for (int i = 1; i <= m; ++i) {
    int k = read();
    bool flag = 1;
    for (int j = 1; j <= k; ++j) {
      int x = read();
      b[i][x] = 1;
    }
    for (int j = 1; j < i; ++j)
      if (!(b[i] & b[j]).count()) {
        puts("impossible");
        return 0;
      }
  }
  puts("possible");
  return 0;
}
