#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int m, n;
  cin >> m >> n;
  vector<vector<int>> shops;
  for (int i = 0; i < m; ++i) {
    int k;
    cin >> k;
    vector<int> cur(k);
    for (int j = 0; j < k; ++j) {
      cin >> cur[j];
    }
    sort(cur.begin(), cur.end());
    for (int j = 0; j < i; ++j) {
      vector<int> tmp;
      set_intersection(shops[j].begin(), shops[j].end(), cur.begin(), cur.end(),
                       back_inserter(tmp));
      if (tmp.empty()) {
        cout << "impossible\n";
        return 0;
      }
    }
    shops.emplace_back(move(cur));
  }
  cout << "possible\n";
  return 0;
}
