#include <bits/stdc++.h>
using namespace std;
int m, n;
vector<vector<int>> arr;
bool intersect(vector<int> a, vector<int> b) {
  int i = 0;
  for (int x : a) {
    while (b[i] < x) ++i;
    if (b[i] == x) return 1;
  }
  return 0;
}
bool invalid(int a, int b) {
  if (arr[a].back() < arr[b].back()) swap(a, b);
  return !intersect(arr[a], arr[b]);
}
int main() {
  cin >> m >> n;
  arr.resize(m);
  for (int i = 0; i != m; ++i) {
    int k;
    cin >> k;
    vector<int> tmp(k);
    for (int j = 0; j != k; ++j) {
      int x;
      scanf("%d", &x);
      tmp[j] = x;
    }
    sort(tmp.begin(), tmp.end());
    arr[i] = tmp;
  }
  for (int i = 0; i != m; ++i)
    for (int j = i + 1; j != m; ++j)
      if (invalid(i, j)) {
        cout << "impossible";
        return 0;
      }
  cout << "possible";
  return 0;
}
