#include <bits/stdc++.h>
using namespace std;
int cnt[55][10005];
int main() {
  int T = 1;
  while (T--) {
    int m, n, f = 1;
    cin >> m >> n;
    for (int i = 1; i <= m; i++) {
      int k, t;
      scanf("%d", &k);
      for (int j = 1; j <= k; j++) scanf("%d", &t), cnt[i][t] = 1;
    }
    for (int i = 1; i <= m; i++)
      for (int j = i + 1; j <= m; j++) {
        int fl = 0;
        for (int k = 1; k <= n; k++)
          if (cnt[i][k] && cnt[j][k]) fl = 1;
        f &= fl;
      }
    puts(f ? "possible" : "impossible");
  }
  return 0;
}
