#include <bits/stdc++.h>
using namespace std;
int main() {
  bool dp[55][10005] = {0};
  int m, n;
  cin >> m >> n;
  int d = m;
  int k;
  while (m--) {
    cin >> k;
    while (k--) {
      int g;
      cin >> g;
      dp[m][g] = 1;
    }
  }
  for (int i = 0; i < d; i++) {
    bool dp1[10005] = {0};
    for (int p = 0; p < 10005; p++) {
      if (dp[i][p] == 1) {
        dp1[p] = 1;
      }
    }
    for (int p = 0; p < d; p++) {
      bool t = 0;
      for (int kk = 0; kk < 10005; kk++) {
        if (dp[p][kk] == 1) {
          if (dp1[kk] == 1) {
            t = 1;
          }
        }
      }
      if (t == 0) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
}
