#include <bits/stdc++.h>
using namespace std;
int m, n;
bool f[55][10005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> m >> n;
  for (int k = 1; k <= m; ++k) {
    int cnt;
    cin >> cnt;
    for (int i = 1; i <= cnt; ++i) {
      int store;
      cin >> store;
      f[k][store] = 1;
    }
  }
  for (int i = 1; i <= m; ++i) {
    for (int j = 1; j <= m; ++j) {
      if (i == j) continue;
      bool found = false;
      for (int k = 1; k <= n; ++k) {
        if (f[i][k] && f[j][k]) {
          found = true;
          break;
        }
      }
      if (!found) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
}
