#include <bits/stdc++.h>
using namespace std;
using ll = long long;
struct IoSetup {
  IoSetup() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(10);
  }
} iosetup;
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << p.first << " " << p.second;
  return os;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (int i = 0; i < (int)v.size(); i++) {
    os << v[i] << (i + 1 != (int)v.size() ? " " : "");
  }
  return os;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
  for (T &in : v) is >> in;
  return is;
}
bitset<10101> b[55], c[55];
int main() {
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < n; ++j) {
      c[i][j] = 1;
    }
  }
  for (int i = 0, x; i < m; ++i) {
    cin >> x;
    for (int j = 0, y; j < x; ++j) {
      cin >> y;
      y--;
      b[i][y] = 1;
      c[i][y] = 0;
    }
  }
  bool ok = true;
  for (int x = 0; x < m; ++x) {
    for (int y = 0; y < m; ++y) {
      if ((c[y] & b[x]) == b[x]) ok = false;
    }
  }
  cout << (ok ? "possible" : "impossible") << endl;
}
