#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 1e4 + 4;
bitset<N> a[52], val;
int main() {
  int n, m;
  scanf("%d", &m);
  scanf("%d", &n);
  for (int i = 0; i < m; i++) {
    int k;
    scanf("%d", &k);
    for (int j = 0; j < k; j++) {
      int temp;
      scanf("%d", &temp);
      a[i][temp] = 1;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < m; j++) {
      val = a[i] & a[j];
      if (!val.count()) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
  return 0;
}
