#include <bits/stdc++.h>
using namespace std;
int freq[51][10005];
int sizes[51];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int m, n;
  cin >> m >> n;
  for (int i = 1; i <= m; ++i) {
    cin >> sizes[i];
    for (int j = 1; j <= sizes[i]; ++j) {
      int x;
      cin >> x;
      freq[i][x] = 1;
    }
  }
  bool ok = true;
  for (int i = 1; i <= m; ++i) {
    for (int j = i + 1; j <= m; ++j) {
      int cnt = 0;
      for (int k = 1; k <= n; ++k) {
        cnt += freq[i][k] * freq[j][k];
      }
      ok &= (cnt != 0);
    }
  }
  if (ok) {
    cout << "possible";
  } else {
    cout << "impossible";
  }
  return 0;
}
