#include <bits/stdc++.h>
using namespace std;
int m, n;
int t, s;
bitset<10024> bs[52];
bool check(int i, int j) {
  bitset<10024> tbs = bs[i];
  tbs &= bs[j];
  return tbs.any();
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> m >> n;
  for (int i = int(0); i < int(m); i++) {
    cin >> t;
    bs[i].reset();
    for (int j = int(0); j < int(t); j++) {
      cin >> s;
      bs[i][s] = 1;
    }
  }
  for (int i = int(0); i < int(m); i++) {
    for (int j = int(i + 1); j < int(m); j++) {
      if (!check(i, j)) {
        cout << "impossible" << endl;
        return 0;
      }
    }
  }
  cout << "possible" << endl;
  return 0;
}
