#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 5;
int main() {
  long long int n, m;
  cin >> n >> m;
  set<long long int> S1, S2;
  long long int flg = 0;
  set<long long int> S[n + 1];
  for (long long int i = 0; i < n; ++i) {
    long long int k;
    cin >> k;
    long long int mk[m + 1];
    memset(mk, 0, sizeof(mk));
    for (long long int j = 0; j < k; ++j) {
      long long int a;
      cin >> a;
      S[i].insert(a);
    }
  }
  long long int f = 0;
  for (long long int i = 0; i < n; ++i) {
    for (long long int j = i + 1; j < n; ++j) {
      long long int mk[m + 1];
      memset(mk, 0, sizeof(mk));
      long long int f2 = 0;
      for (auto it = S[i].begin(); it != S[i].end(); it++) {
        mk[(*it)] = 1;
      }
      for (auto it = S[j].begin(); it != S[j].end(); it++) {
        if (mk[(*it)] == 1) {
          f2 = 1;
        }
      }
      if (f2 == 0) f = 1;
    }
  }
  if (f == 0)
    cout << "possible"
         << "\n";
  else
    cout << "impossible"
         << "\n";
  return 0;
}
