#include <bits/stdc++.h>
using namespace std;
long long vs[200000], a[55][20000], b[55];
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
  };
  long long i, j, k, l = 0, n, m, h, mod = 1e9 + 7, cnt = 0, mx = 1e10, t,
                     ans = 0;
  cin >> m >> n;
  h = m;
  for (i = 1; i <= m; i++) {
    cin >> b[i];
    for (j = 1; j <= b[i]; j++) {
      cin >> a[i][j];
    }
  }
  for (i = 1; i < m; i++) {
    for (t = i + 1; t <= m; t++) {
      h = 1;
      for (j = 1; j <= b[i]; j++) vs[a[i][j]] = 1;
      for (j = 1; j <= b[t]; j++) {
        if (vs[a[t][j]]) h = 0;
      }
      for (j = 1; j <= b[i]; j++) vs[a[i][j]] = 0;
      if (h) l = 1;
    }
  }
  !l ? cout << "possible" << endl : cout << "impossible" << endl;
  return 0;
}
