#include <bits/stdc++.h>
using namespace std;
bitset<50030> b[52];
int main() {
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    while (k--) {
      int x;
      cin >> x;
      b[i][x] = 1;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < m; j++) {
      if ((b[i] & b[j]).count() == 0) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
  return 0;
}
