#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5;
int a[55][N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int m, n;
  cin >> m >> n;
  for (int i = 1; i <= m; i++) {
    int k;
    cin >> k;
    for (int j = 1; j <= k; j++) {
      int x;
      cin >> x;
      a[i][x] = 1;
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = i + 1; j <= m; j++) {
      bool ok = 0;
      for (int k = 1; k <= n; k++) {
        if (a[i][k] && a[j][k]) {
          ok = 1;
          break;
        }
      }
      if (!ok) {
        cout << "impossible\n";
        return 0;
      }
    }
  }
  cout << "possible\n";
  return 0;
}
