#include <bits/stdc++.h>
#pragma warning(disable : 4996);
const double eps = 1e-8;
const int MAXN = 3e5 + 5;
const int MAXM = 2e6 + 5;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1);
using namespace std;
int n, m;
bitset<10005> a[60];
int main() {
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    int tmp;
    cin >> tmp;
    for (int j = 0; j < tmp; j++) {
      int t;
      cin >> t;
      a[i].set(t);
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < i; j++) {
      if (!(a[i] & a[j]).any()) {
        cout << "impossible\n";
        return 0;
      }
    }
  }
  cout << "possible\n";
}
