#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5;
int n, m;
bitset<N> s[N];
int main() {
  scanf("%d%d", &m, &n);
  for (int i = 1, k, x; i <= m; ++i) {
    scanf("%d", &k);
    while (k--) scanf("%d", &x), s[i][x] = 1;
  }
  for (int i = 1; i <= m; ++i)
    for (int j = i + 1; j <= m; ++j)
      if ((s[i] & s[j]).none()) return puts("impossible"), 0;
  puts("possible");
  return 0;
}
