#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll llinf = (1ll << 61) - 1;
int m, n, s;
set<int> a[55];
int main() {
  cin.tie(NULL);
  cin >> m >> n;
  bool ok = 1;
  for (int i = 0; i < m; i++) {
    cin >> s;
    for (int j = 0; j < s; j++) {
      int c;
      scanf("%d", &c);
      a[i].insert(c);
    }
    for (int j = 0; j < i; j++) {
      bool ok2 = 0;
      for (auto &k : a[i]) {
        if (a[j].find(k) != a[j].end()) {
          ok2 = 1;
          break;
        }
      }
      ok &= ok2;
    }
  }
  puts(ok ? "possible" : "impossible");
  return 0;
}
