#include <bits/stdc++.h>
using namespace std;
int was[10005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int m, n;
  cin >> m >> n;
  vector<vector<int> > arr(m, vector<int>());
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    while (x--) {
      int ind;
      cin >> ind;
      arr[i].push_back(ind);
    }
  }
  for (int i = 0; i < m; i++) {
    for (int el : arr[i]) {
      was[el] = i + 1;
    }
    for (int j = i + 1; j < m; j++) {
      bool bad = true;
      for (int el : arr[j]) {
        if (was[el] == i + 1) {
          bad = false;
          break;
        }
      }
      if (bad) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
  return 0;
}
