#include <bits/stdc++.h>
using namespace std;
void shikhar7s(long long int cas) {
  long long int n, c, a, j, m, i, f = 0;
  cin >> m >> n;
  string s[m];
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) s[i].push_back('0');
    cin >> c;
    for (j = 0; j < c; j++) {
      cin >> a;
      s[i][a - 1] = '1';
    }
  }
  long long int k;
  for (i = 0; i < m - 1; i++) {
    for (j = i + 1; j < m; j++) {
      f = 0;
      for (k = 0; k < n; k++) {
        if (s[i][k] == '1' && s[j][k] == '1') {
          f = 1;
          break;
        }
      }
      if (!f) {
        cout << "impossible";
        return;
      }
    }
  }
  cout << "possible";
}
signed main() {
  std::ios_base::sync_with_stdio(false);
  long long int t = 1;
  long long int cas = 1;
  while (cas <= t) {
    shikhar7s(cas);
    cas++;
  }
  return 0;
}
