#include <bits/stdc++.h>
using namespace std;
bitset<10004> mp[54];
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) mp[i].reset();
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    int x, s;
    scanf("%d", &s);
    for (int j = 1; j <= s; j++) {
      scanf("%d", &x);
      mp[i].set(x);
    }
    for (int j = 1; j < i; j++) {
      if (!((mp[i] & mp[j]).count())) return puts("impossible"), 0;
    }
  }
  puts("possible");
  return 0;
}
