#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
int m, n;
vector<vector<int> > vec, vec2;
int qt[11001];
bool check(vector<int> aux, vector<int> aux2) {
  for (int i = 0; i < int(aux.size()); i++) {
    if (binary_search(aux2.begin(), aux2.end(), aux[i])) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    int tam;
    cin >> tam;
    for (int j = 1; j <= n; j++) qt[j] = 0;
    for (int j = 0; j < tam; j++) {
      int a;
      cin >> a;
      qt[a]++;
    }
    vector<int> aux, aux2;
    for (int j = 1; j <= n; j++) {
      if (qt[j] == 1)
        aux.push_back(j);
      else
        aux2.push_back(j);
    }
    vec.push_back(aux), vec2.push_back(aux2);
  }
  for (auto i : vec) {
    for (auto j : vec) {
      if (check(i, j)) {
        cout << "impossible"
             << "\n";
        return 0;
      }
    }
  }
  cout << "possible"
       << "\n";
  return 0;
}
