#include <bits/stdc++.h>
using namespace std;
const int M = 50;
const int N = (int)1e4;
bitset<N> a[M];
int main() {
  int m, n;
  scanf("%d %d", &m, &n);
  for (int i = 0; i < m; ++i) {
    int k;
    scanf("%d", &k);
    while (k--) {
      int pos;
      scanf("%d", &pos);
      --pos;
      a[i][pos] = 1;
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j = i + 1; j < m; ++j) {
      if ((a[i] & a[j]).count() == 0) {
        printf("impossible\n");
        return 0;
      }
    }
  }
  printf("possible\n");
}
