#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vd = vector<double>;
using vs = vector<string>;
using vpii = vector<pair<int, int>>;
using vpll = vector<pair<ll, ll>>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
void solve() {
  int m, n;
  cin >> m >> n;
  vector<set<int>> v(n);
  for (ll i = 0; i < (m); i++) {
    int k;
    cin >> k;
    for (ll j = 0; j < (k); j++) {
      int x;
      cin >> x;
      v[i].insert(x);
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      bool ok = false;
      for (int x : v[i]) {
        if (v[j].count(x) > 0) {
          ok = true;
          break;
        }
      }
      if (!ok) {
        cout << "impossible" << '\n';
        return;
      }
    }
  }
  cout << "possible" << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ll t = 1;
  while (t--) {
    solve();
  }
}
