#include <bits/stdc++.h>
using namespace std;
bool vis[10010][51];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    int k;
    cin >> k;
    for (int j = 0; j < k; j++) {
      int temp;
      cin >> temp;
      vis[temp][i] = true;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      int flag = 0;
      for (int k = 1; k < n + 1; k++) {
        if (vis[k][i] && vis[k][j]) {
          flag = 1;
          break;
        }
      }
      if (flag == 0) {
        cout << "impossible" << endl;
        return 0;
      }
    }
  }
  cout << "possible" << endl;
}
