#include <bits/stdc++.h>
using namespace std;
const long long mx = 1e4 + 5, mx2 = 55;
long long n, m;
vector<int> vec[mx2], v;
bool mp[mx];
bool flg;
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> m >> n;
  for (int i = 1; i <= m; i++) {
    int si;
    cin >> si;
    for (int j = 0; j < si; j++) {
      int a;
      cin >> a;
      vec[i].push_back(a);
    }
  }
  for (int i = 1; i <= m; i++) {
    for (int j = i + 1; j <= m; j++) {
      flg = 0;
      v.clear();
      for (int r = 0; r < vec[i].size(); r++) {
        int u = vec[i][r];
        mp[u] = 1;
        v.push_back(u);
      }
      for (int r = 0; r < vec[j].size(); r++) {
        int u = vec[j][r];
        if (mp[u] == 1) flg = 1;
      }
      for (int r = 0; r < v.size(); r++) {
        mp[v[r]] = 0;
      }
      if (flg == 0) return cout << "impossible" << endl, 0;
    }
  }
  cout << "possible" << endl;
  return 0;
}
