#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n, s, en;
  scanf("%d %d", &m, &n);
  set<int> ms[m];
  set<int>::iterator it;
  int i, j, k;
  for (i = 0; i < m; i++) {
    scanf("%d", &s);
    for (k = 0; k < s; k++) {
      scanf("%d", &en);
      ms[i].insert(en);
    }
    for (j = i - 1; j >= 0; j--) {
      for (it = ms[i].begin(); it != ms[i].end(); it++) {
        if (ms[j].count((*it)) > 0) break;
      }
      if (it == ms[i].end()) {
        printf("impossible\n");
        return 0;
      }
    }
  }
  printf("possible\n");
  return 0;
}
