#include <bits/stdc++.h>
using namespace std;
const long long N = 1000100;
vector<pair<long long, long long>> points;
bool isUsed[N];
long long ccw(pair<long long, long long> a, pair<long long, long long> b,
              pair<long long, long long> c) {
  return (b.first - a.first) * (c.second - a.second) -
         (b.second - a.second) * (c.first - a.first);
}
bitset<10001> bm[55];
void solve() {
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    int c;
    cin >> c;
    while (c--) {
      int x;
      cin >> x;
      bm[i].set(x);
    }
    for (int j = 0; j < i; j++) {
      if ((bm[i] & bm[j]).none()) {
        cout << "impossible" << endl;
        return;
      }
    }
  }
  cout << "possible";
}
int main() {
  solve();
  return 0;
}
