#include <bits/stdc++.h>
using namespace std;
int add(int _a, int _b) {
  _a = (_a + 1000000007) % 1000000007;
  _b = (_b + 1000000007) % 1000000007;
  return (_a + _b) % 1000000007;
}
int mul(int _a, int _b) {
  _a = (_a + 1000000007) % 1000000007;
  _b = (_b + 1000000007) % 1000000007;
  return ((long long int)((long long int)_a * (long long int)_b)) % 1000000007;
}
int m, n;
bitset<10010> bit[50];
void input() {
  int i, j, s;
  scanf("%d %d", &m, &n);
  for (i = 0; i < m; i++) {
    scanf("%d", &s);
    for (j = 0; j < s; j++) {
      int x;
      scanf("%d", &x);
      x--;
      bit[i][x] = 1;
    }
  }
}
void solve() {
  int i, j;
  for (i = 0; i < m; i++) {
    for (j = i + 1; j < m; j++) {
      if ((bit[i] & bit[j]).count() == 0) {
        printf("%s", "impossible\n");
        return;
      }
    }
  }
  printf("%s", "possible\n");
}
int main() {
  input();
  solve();
}
