#include <bits/stdc++.h>
using namespace std;
long long int n, m;
vector<long long int> s[59];
vector<long long int> rem[59];
bool check(long long int i, long long int j) {
  if (includes(rem[j].begin(), rem[j].end(), s[i].begin(), s[i].end())) {
    return 0;
  }
  return 1;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.precision(10);
  cout << fixed;
  ;
  cin >> n >> m;
  long long int see;
  for (long long int i = 0; i < n; i++) {
    cin >> see;
    map<long long int, long long int> mp;
    for (long long int j = 0; j < see; j++) {
      long long int temp;
      cin >> temp;
      s[i].push_back(temp);
      mp[temp]++;
    }
    sort(s[i].begin(), s[i].end());
    for (long long int j = 1; j <= m; j++) {
      if (mp[j] == 0) {
        rem[i].push_back(j);
      }
    }
  }
  bool is = 1;
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < n; j++) {
      is = check(i, j);
      if (is == 0) {
        cout << "impossible"
             << "\n";
        return 0;
      }
    }
  }
  cout << "possible"
       << "\n";
  return 0;
}
