#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double pi = acos(-1.0);
const double dinf = 1e250;
const long long INF = (long long)(2e18);
const int inf = (int)(1e9 + 7);
const int maxn = 10005;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(10);
  cin.tie(0);
  int m, n;
  cin >> m >> n;
  bitset<maxn> emp;
  vector<bitset<maxn>> mat(m);
  for (int i = 0; i < m; ++i) {
    int k;
    cin >> k;
    while (k--) {
      int t;
      cin >> t;
      mat[i][t] = 1;
    }
  }
  for (int i = 0; i < m; ++i) {
    for (int j = i + 1; j < m; ++j) {
      if ((mat[i] & mat[j]) == emp) {
        cout << "impossible";
        exit(0);
      };
    }
  }
  cout << "possible";
  return 0;
}
