#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 7;
int n, m;
vector<int> vis[maxn];
set<int> sq;
int main() {
  cin >> m >> n;
  int flag = 1;
  for (int i = 0; i < m; i++) {
    int s;
    cin >> s;
    sq.clear();
    for (int j = 0; j < s; j++) {
      int x;
      cin >> x;
      if (flag == 0) continue;
      vis[x].push_back(i);
      for (int k = 0; k < vis[x].size(); k++) sq.insert(vis[x][k]);
    }
    if (flag == 1 && sq.size() <= i) flag = 0;
  }
  if (flag)
    cout << "possible" << endl;
  else
    cout << "impossible" << endl;
  return 0;
}
