#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 6;
int n, m, a, b;
bool arr[N][N];
vector<int> d[N];
signed main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a);
    for (int j = 1; j <= a; ++j) {
      scanf("%d", &b);
      arr[i][b] = 1;
      d[i].push_back(b);
    }
  }
  for (int i = 1; i < n; ++i) {
    for (int j = i + 1; j <= n; ++j) {
      bool ok = 0;
      for (int k = 0; k < d[i].size(); ++k) {
        if (arr[j][d[i][k]]) {
          ok = 1;
          break;
        }
      }
      if (!ok) {
        for (int k = 0; k < d[j].size(); ++k) {
          if (arr[i][d[j][k]]) {
            ok = 1;
            break;
          }
        }
      }
      if (!ok) {
        printf("impossible");
        return 0;
      }
    }
  }
  printf("possible");
}
