#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 20;
const int oo = 1e9 + 20;
const int MOD = 1e9 + 7;
bitset<N> a[52];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int m, n;
  while (cin >> m >> n) {
    for (int i = 0; i < m; i++) {
      int s;
      cin >> s;
      for (int j = 0; j < s; j++) {
        int x;
        cin >> x;
        a[i][x] = 1;
      }
    }
    bool f = 0;
    for (int i = 0; i < m; i++) {
      for (int j = i + 1; j < m; j++) {
        if ((a[i] & a[j]).count() == 0) {
          f = 1;
        }
      }
    }
    cout << (f ? "impossible" : "possible") << '\n';
  }
  return 0;
}
