#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(NULL);
  int m, n;
  cin >> m >> n;
  set<int> v[m];
  for (int i = 0; i < m; i++) {
    int s;
    cin >> s;
    for (int j = 0; j < s; j++) {
      int x;
      cin >> x;
      v[i].insert(x);
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      int cnt = 0;
      for (auto it : v[i]) {
        if (v[j].find(it) != v[j].end()) {
          cnt = 1;
          break;
        }
      }
      if (cnt == 0) {
        cout << "impossible";
        exit(0);
      }
    }
  }
  cout << "possible";
  return 0;
}
