#include <bits/stdc++.h>
using namespace std;
const char* str[] = {"impossible", "possible"};
bitset<10005> bit[55];
int main() {
  int n, m, ans = 1;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    int s, t;
    scanf("%d", &s);
    while (s--) scanf("%d", &t), bit[i][t] = 1;
    for (int j = 1; j < i; j++)
      if (!(bit[i] & bit[j]).count()) {
        ans = 0;
        goto END;
      }
  }
END:
  puts(str[ans]);
  return 0;
}
