#include <bits/stdc++.h>
using namespace std;
int mult(int a, int b, int p = 1000000007) { return ((a % p) * (b % p)) % p; }
int multbig(int a, int b, int mod) {
  if (a == 0 or b == 0) return 0;
  if (a == 1 or b == 1) return (a * b) % mod;
  int cur = multbig(a, b / 2, mod);
  cur = (2 * cur) % mod;
  if (b % 2) cur = (cur + a) % mod;
  return cur;
}
int add(int a, int b, int p = 1000000007) { return (a % p + b % p) % p; }
int fpow(int n, int k, int p = 1000000007) {
  int r = 1;
  for (; k; k >>= 1LL) {
    if (k & 1LL) r = mult(r, n, p);
    n = mult(n, n, p);
  }
  return r;
}
int inv(int a, int p = 1000000007) { return fpow(a, p - 2, p); }
int inv_euclid(int a, int m = 1000000007) {
  int m0 = m;
  int y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    int q = a / m;
    int t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
int main() {
  ios::sync_with_stdio(0);
  int n, m;
  cin >> m >> n;
  map<vector<int>, int> mm;
  int fin = 0;
  for (int i = 0; i < (int)m; i++) {
    int p;
    cin >> p;
    vector<int> v;
    for (int j = 0; j < (int)p; j++) {
      int q;
      cin >> q;
      v.push_back(q);
    }
    sort(v.begin(), v.end());
    int ff = 0;
    for (auto e : mm) {
      map<int, int> temp;
      for (auto k : e.first) {
        temp[k]++;
      }
      int f = 1;
      for (auto k : v) {
        if (temp[k] == 0) {
          f = 0;
          break;
        }
      }
      if (f == 1) {
        ff = 1;
        break;
      }
    }
    if (ff) {
      fin = 1;
      cout << "impossible\n";
      return 0;
    }
    set<int> s;
    for (int i = 1; i <= n; i++) {
      s.insert(i);
    }
    for (int i = 0; i < (int)v.size(); i++) {
      s.erase(v[i]);
    }
    vector<int> vv(s.begin(), s.end());
    mm[vv] = 1;
  }
  cout << "possible\n";
}
