#include <bits/stdc++.h>
using namespace std;
bool ache[55][10005];
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  };
  int n, m;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    while (k--) {
      int x;
      cin >> x;
      ache[i][x] = 1;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      int poss = 0;
      for (int p = 1; p <= n; p++) {
        if (ache[i][p] && ache[j][p]) poss = 1;
      }
      if (!poss) {
        cout << "impossible" << endl;
        return 0;
      }
    }
  }
  cout << "possible" << endl;
}
