#include <bits/stdc++.h>
using namespace std;
const int N = 1E4 + 5;
vector<int> a[52];
int main() {
  int m, n;
  scanf("%d%d", &m, &n);
  for (int i = 1; i <= m; i++) {
    int k;
    scanf("%d", &k);
    for (int j = 1; j <= k; j++) {
      int x;
      scanf("%d", &x);
      a[i].push_back(x);
    }
    sort(a[i].begin(), a[i].end());
    for (int j = 1; j < i; j++) {
      bool f = true;
      for (int x : a[i]) {
        auto it = lower_bound(a[j].begin(), a[j].end(), x);
        if (it != a[j].end() && *it == x) f = false;
      }
      if (f) {
        printf("impossible\n");
        return 0;
      }
    }
  }
  printf("possible\n");
}
