#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  cin >> m >> n;
  vector<vector<int>> day(m + 1);
  for (int i = 1; i <= m; i++) {
    int s;
    cin >> s;
    for (int j = 0; j < s; j++) {
      int a;
      cin >> a;
      day[i].push_back(a);
    }
    sort(day[i].begin(), day[i].end());
  }
  bool dis = 0;
  for (int i = 1; i <= m; i++) {
    for (int j = i + 1; j <= m; j++) {
      int x = 0, y = 0;
      bool found = 0;
      while (x < day[i].size() && y < day[j].size()) {
        if (day[i][x] > day[j][y]) {
          y++;
        } else if (day[i][x] < day[j][y]) {
          x++;
        } else {
          found = 1;
          break;
        }
      }
      if (!found) {
        dis = 1;
        break;
      }
    }
  }
  if (dis) {
    cout << "impossible" << endl;
  } else {
    cout << "possible" << endl;
  }
}
