#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
int n, m, tot, p;
int vis[60][maxn];
int main() {
  scanf("%d%d", &m, &n);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &tot);
    for (int j = 1; j <= tot; j++) {
      scanf("%d", &p);
      vis[i][p] = 1;
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = i + 1; j <= m; j++) {
      bool f = false;
      for (int k = 1; k <= n; k++) {
        if (vis[i][k] == 1 && vis[j][k] == 1) {
          f = true;
          break;
        }
      }
      if (!f) {
        puts("impossible");
        return 0;
      }
    }
  }
  puts("possible");
}
