#include <bits/stdc++.h>
using namespace std;
bool a[50][10000];
long long m, n;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> m >> n;
  for (long long i = 0; i < m; i++) {
    long long k;
    cin >> k;
    for (long long e = 0; e < k; e++) {
      long long x;
      cin >> x;
      x--;
      a[i][x] = true;
    }
  }
  for (long long i = 0; i < m; i++) {
    for (long long e = 0; e < m; e++) {
      bool u = false;
      for (long long j = 0; j < n; j++) u |= (a[i][j] & a[e][j]);
      if (!u) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
}
