#include <bits/stdc++.h>
using namespace std;
const unsigned long long mod = 1e9 + 7;
template <class S, class T>
ostream& operator<<(ostream& os, const pair<S, T> v) {
  os << "(" << v.first << ", " << v.second << ")";
  return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T> v) {
  for (int i = 0; i < v.size(); i++) {
    if (i > 0) {
      os << " ";
    }
    os << v[i];
  }
  return os;
}
template <class T>
ostream& operator<<(ostream& os, const vector<vector<T>> v) {
  for (int i = 0; i < v.size(); i++) {
    if (i > 0) {
      os << endl;
    }
    os << v[i];
  }
  return os;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long m, n;
  cin >> m >> n;
  vector<long long> x[m];
  for (int i = 0; i < (int)m; ++i) {
    long long y, tmp;
    cin >> y;
    for (int j = 0; j < (int)y; ++j) {
      cin >> tmp;
      x[i].push_back(tmp);
    }
  }
  bool flag = true;
  for (int i = 0; i < (int)m; ++i) {
    for (int j = 0; j < (int)m; ++j) {
      if (i < j) {
        vector<long long> cnt(n, 0);
        for (int k = 0; k < (int)x[i].size(); ++k) {
          cnt[x[i][k] - 1]++;
        }
        for (int k = 0; k < (int)x[j].size(); ++k) {
          cnt[x[j][k] - 1]++;
        }
        bool flag2 = false;
        for (int i = 0; i < (int)n; ++i) {
          if (cnt[i] >= 2) flag2 = true;
        }
        if (!flag2) flag = false;
      }
    }
  }
  cout << (flag ? "possible" : "impossible") << endl;
  return 0;
}
