#include <bits/stdc++.h>
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using namespace std;
const int N = 1e4 + 2;
int n, m;
bool in[51][N];
bool isect(int a, int b) {
  for (int i = (1); i <= (n); ++i)
    if (in[a][i] && in[b][i]) return 1;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> m >> n;
  for (int i = (1); i <= (m); ++i) {
    int k;
    cin >> k;
    for (int j = (1); j <= (k); ++j) {
      int x;
      cin >> x;
      in[i][x] = 1;
    }
  }
  for (int i = (1); i <= (m - 1); ++i)
    for (int j = (i + 1); j <= (m); ++j)
      if (!isect(i, j)) {
        cout << "impossible";
        return 0;
      }
  cout << "possible";
  return 0;
}
