#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 10;
const long long mod = 998244353;
int n, m, k, x;
bool a[55][maxn];
int main() {
  scanf("%d%d", &m, &n);
  for (int i = 1; i <= (m); i++) {
    scanf("%d", &k);
    for (int j = 1; j <= (k); j++) {
      scanf("%d", &x);
      a[i][x] = 1;
    }
  }
  for (int i = 1; i <= (m); i++)
    for (int j = 1; j <= (m); j++) {
      bool flag = 0;
      for (int l = 1; l <= n && !flag; l++)
        if (a[i][l] && a[j][l]) flag = 1;
      if (!flag) {
        printf("impossible\n");
        return 0;
      }
    }
  printf("possible\n");
  return 0;
}
