#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1000010;
long long N, M;
bitset<MAXN> g[100];
int main() {
  scanf("%lld%lld", &M, &N);
  for (long long k, i = 1; i <= M; i++) {
    scanf("%lld", &k);
    for (long long j = 1, t; j <= k; j++) {
      scanf("%lld", &t);
      g[i][t] = 1;
    }
  }
  bool flag = 1;
  for (long long i = 1; i <= M; i++) {
    for (long long j = i + 1; j <= M; j++) {
      bitset<MAXN> tmp = g[i] & g[j];
      if (tmp.count() == 0) {
        flag = 0;
      }
    }
  }
  if (flag) {
    printf("possible");
  } else {
    printf("impossible");
  }
  return 0;
}
