#include <bits/stdc++.h>
using namespace std;
int main() {
  long m, n;
  vector<vector<bool>> A;
  bool IsOK = true;
  cin >> m >> n;
  A.resize(m, vector<bool>(n, false));
  for (long i = 0, s, x; i < m && IsOK; ++i) {
    cin >> s;
    while (s--) {
      cin >> x;
      A[i][--x] = true;
    }
    for (long j = 0; j < i && IsOK; ++j) {
      bool OK = false;
      for (long k = 0; k < n && !OK; ++k)
        if (A[i][k] && A[j][k]) OK = true;
      IsOK = IsOK && OK;
    }
  }
  cout << (IsOK ? "possible" : "impossible");
  return 0;
}
