#include <bits/stdc++.h>
using namespace std;
int m, n;
int b[55][10005];
int main() {
  cin >> m >> n;
  for (int i = 1; i <= m; ++i) {
    int x;
    scanf("%d", &x);
    for (int j = 1; j <= x; ++j) {
      int y;
      scanf("%d", &y);
      b[i][y] = 1;
    }
  }
  for (int i = 1; i <= m; ++i) {
    for (int j = i + 1; j <= m; ++j) {
      int r = 1;
      for (int k = 1; k <= n; ++k) {
        if (b[i][k] && b[j][k]) {
          r = 0;
          break;
        }
      }
      if (r) {
        puts("impossible");
        return 0;
      }
    }
  }
  puts("possible");
  return 0;
}
