#include <bits/stdc++.h>
using namespace std;
bool s[55][10005];
int main() {
  int m, n, tmp, a;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    cin >> tmp;
    for (int j = 0; j < tmp; j++) {
      cin >> a;
      s[i][a] = true;
    }
  }
  int flag = 1;
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      tmp = 0;
      for (int k = 1; k <= n; k++) {
        if (s[i][k] && s[j][k]) {
          tmp = 1;
          break;
        }
      }
      if (!tmp) {
        flag = 0;
        break;
      }
    }
    if (!flag) break;
  }
  if (flag)
    cout << "possible\n";
  else
    cout << "impossible\n";
  return 0;
}
