#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
template <typename T, typename TT>
ostream& operator<<(ostream& os, const pair<T, TT>& t) {
  return os << "(" << t.first << ", " << t.second << ")";
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& t) {
  for (auto& i : t) os << i << " ";
  return os;
}
int main(int argc, char** argv) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> m >> n;
  set<int> sat[m];
  for (int i = 0; i < m; i++) {
    int l;
    cin >> l;
    for (int j = 0; j < l; j++) {
      int a;
      cin >> a;
      sat[i].insert(a);
    }
  }
  bool flag = true;
  for (int i = 0; i + 1 < m; i++) {
    for (int j = i + 1; j < m; j++) {
      bool localFlag = false;
      for (const int& item : sat[i])
        if (sat[j].find(item) != sat[j].end()) {
          localFlag = true;
          break;
        }
      if (!localFlag) {
        flag = false;
        break;
      }
    }
    if (!flag) break;
  }
  cout << (flag ? "possible\n" : "impossible\n");
  return 0;
}
