#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> m >> n;
  vector<vector<bool>> a(m, vector<bool>(n, false));
  for (int i = 0; i < m; i++) {
    int s;
    cin >> s;
    while (s--) {
      int j;
      cin >> j;
      j--;
      a[i][j] = true;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      bool flag = false;
      for (int k = 0; k < n; k++) {
        flag |= (a[i][k] & a[j][k]);
      }
      if (!flag) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
  return 0;
}
