#include <bits/stdc++.h>
using namespace std;
unsigned long long vs[50][160];
int main() {
  int n, m;
  scanf("%d %d", &m, &n);
  memset(vs, 0, sizeof(unsigned long long) * 50 * 160);
  for (int i = 0; i < m; i++) {
    int s;
    scanf("%d", &s);
    for (int j = 0; j < s; j++) {
      int st;
      scanf("%d", &st);
      st--;
      vs[i][st >> 6] |= 1ULL << (st & 0x3F);
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < m; j++) {
      if (i == j) continue;
      bool isInclude = true;
      for (int k = 0; k < (n + 63) >> 6; k++) {
        if (((~vs[i][k]) & vs[j][k]) != vs[j][k]) {
          isInclude = false;
          break;
        }
      }
      if (isInclude) {
        printf("impossible");
        return 0;
      }
    }
  }
  printf("possible");
  return 0;
}
