#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1000777216")
using namespace std;
using ll = long long;
using ld = long double;
void precalc() {}
const int MAXN = 2 * 1e5 + 10;
ll inp[MAXN];
void solve() {
  int n, m;
  vector<set<int>> inp;
  cin >> m >> n;
  for (int i = 0; i < m; ++i) {
    int s;
    cin >> s;
    set<int> cur;
    for (int j = 0; j < s; ++j) {
      int curr;
      cin >> curr;
      cur.insert(curr);
    }
    inp.push_back(cur);
  }
  for (int i = 0; i < m; ++i) {
    for (int j = 0; j < m; ++j) {
      vector<int> temp(2 * n);
      auto it =
          std::set_intersection(inp[i].begin(), inp[i].end(), inp[j].begin(),
                                inp[j].end(), temp.begin());
      temp.resize(it - temp.begin());
      if (temp.size() == 0) {
        cout << "impossible\n";
        return;
      }
    }
  }
  cout << "possible\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(20);
  precalc();
  solve();
}
