#include <bits/stdc++.h>
bool intersect(const std::set<int>& a, const std::set<int>& b) {
  for (const int& i : a)
    if (b.count(i)) return true;
  return false;
}
int32_t main() {
  int days, n;
  scanf("%d%d", &days, &n);
  std::vector<std::set<int> > day(days);
  for (int i = 0; i < days; i++) {
    int s;
    scanf("%d", &s);
    for (int j = 0; j < s; j++) {
      int indice;
      scanf("%d", &indice);
      day[i].insert(indice);
    }
  }
  for (int i = 0; i < days; i++)
    for (int j = i + 1; j < days; j++)
      if (!intersect(day[i], day[j])) return puts("impossible"), 0;
  puts("possible");
  return 0;
}
