#include <bits/stdc++.h>
using namespace std;
int n, m;
set<int> a[105];
int main() {
  cin >> m >> n;
  for (int i = 1; i <= m; i++) {
    int s;
    scanf("%d", &s);
    for (int j = 0; j < s; j++) {
      int u;
      scanf("%d", &u);
      a[i].insert(u);
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = i + 1; j <= m; j++) {
      int f = 0;
      for (auto x : a[i]) {
        auto p = a[j].lower_bound(x);
        if (*p == x) {
          f = 1;
          break;
        }
      }
      if (f) continue;
      return puts("impossible"), 0;
    }
  }
  return puts("possible"), 0;
}
