#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e4 + 10;
const int MAXM = 52;
int m, n;
int a[MAXN][MAXM];
int flag = 0;
int main() {
  memset(a, 0, sizeof(a));
  scanf("%d%d", &m, &n);
  for (int i = 1, tot, p; i <= m; i++) {
    scanf("%d", &tot);
    while (tot--) {
      scanf("%d", &p);
      a[p][i] = 1;
    }
  }
  for (int i = 1; i <= m; i++)
    for (int j = i + 1; j <= m; j++) {
      int f1 = 0, f2 = 0;
      for (int k = 1; k <= n; k++) {
        if (a[k][i] + a[k][j] == 2) f1 = 1;
        if (a[k][i] + a[k][j] == 1) f2 = 1;
      }
      if (f1 == 0 && f2 == 1) flag = 1;
    }
  if (flag)
    puts("impossible");
  else
    puts("possible");
  return 0;
}
