#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long int INF = 9e18 + 2e17;
const int inf = 2e9;
const int N = 1e4 + 22;
const double eps = 1e-10;
const double PI = 3.14159265;
int n, m, k;
vector<int> a[51];
bool vis[N];
void _solve() {
  cin >> m >> n;
  for (int i = (int)0; i < (int)m; i++) {
    cin >> k;
    int x;
    for (int j = (int)0; j < (int)k; j++) cin >> x, a[i].push_back(x);
  }
  int ok = 1;
  for (int i = (int)0; i < (int)m; i++) {
    fill(vis, vis + N, 0);
    for (int el : a[i]) vis[el] = 1;
    for (int j = (int)0; j < (int)m; j++) {
      bool check = 0;
      for (int el : a[j]) check |= vis[el];
      ok &= check;
    }
  }
  cout << (ok ? "possible" : "impossible");
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  _solve();
  return 0;
}
