#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int main() {
  scanf("%d%d", &m, &n);
  vector<vector<bool>> vis(m, vector<bool>(n));
  bool nice = true;
  for (int i = 0; i < m; i++) {
    scanf("%d", &k);
    vector<int> a(k);
    for (int j = 0; j < k; j++) {
      scanf("%d", &a[j]);
      vis[i][--a[j]] = true;
    }
    for (int j = 0; j < i; j++) {
      bool flag = false;
      for (int l = 0; l < k; l++) {
        if (vis[j][a[l]]) {
          flag = true;
          break;
        }
      }
      if (!flag) nice = false;
    }
  }
  if (nice) {
    printf("possible\n");
  } else
    printf("impossible\n");
  return 0;
}
