#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("section-anchors")
#pragma GCC optimize("profile-values,profile-reorder-functions,tracer")
#pragma GCC optimize("vpt")
#pragma GCC optimize("rename-registers")
#pragma GCC optimize("move-loop-invariants")
#pragma GCC optimize("unswitch-loops")
#pragma GCC optimize("function-sections")
#pragma GCC optimize("data-sections")
#pragma GCC optimize("branch-target-load-optimize")
#pragma GCC optimize("branch-target-load-optimize2")
#pragma GCC optimize("btr-bb-exclusive")
using namespace std;
const long long INF = 1e13;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<vector<long long>> a(n);
  long long sz;
  for (long long i = 0; i < n; i++) {
    cin >> sz;
    a[i].resize(sz);
    for (long long j = 0; j < sz; j++) {
      cin >> a[i][j];
      a[i][j]--;
    }
  }
  vector<bool> used;
  bool ok = 0;
  for (long long i = 0; i < n - 1; i++) {
    for (long long j = i + 1; j < n; j++) {
      used.assign(m, 0);
      for (auto k : a[i]) {
        used[k] = 1;
      }
      ok = 0;
      for (auto k : a[j]) {
        if (used[k]) ok = 1;
      }
      if (!ok) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
}
