#include <bits/stdc++.h>
using namespace std;
long long m, n;
bitset<10001> b[55];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> m >> n;
  for (long long i = 1; i <= m; i++) {
    long long x;
    cin >> x;
    b[i].reset();
    while (x--) {
      long long y;
      cin >> y;
      b[i][y] = 1;
    }
  }
  bool ok = true;
  for (long long i = 1; i <= m; i++) {
    for (long long j = i + 1; j <= m; j++) {
      bitset<10001> tmp = b[i];
      tmp &= b[j];
      if (tmp.any()) continue;
      ok = false;
      break;
    }
    if (ok == false) break;
  }
  if (ok)
    cout << "possible\n";
  else
    cout << "impossible\n";
  return 0;
}
