#include <bits/stdc++.h>
using namespace std;
const int N = 10000 + 77, NN = 77;
bitset<N> T[NN], Y, EMP;
int q, n;
int main() {
  scanf("%d %d", &q, &n);
  for (int i = 1; i <= q; ++i) {
    int x, y;
    scanf("%d", &x);
    Y = EMP;
    while (x--) scanf("%d", &y), Y[y] = 1;
    T[i] = Y;
  }
  for (int i = 1; i <= q; ++i)
    for (int j = i + 1; j <= q; ++j)
      if ((T[i] & T[j]) == EMP) return !printf("impossible\n");
  printf("possible\n");
  return 0;
}
