#include <bits/stdc++.h>
using namespace std;
int n, m, i, len[55], a[55][10010], j;
bool check(int x, int y) {
  int lx = 0, ly = 0;
  while ((lx < len[x]) && (ly < len[y])) {
    if (a[x][lx] == a[y][ly]) return 1;
    if (a[x][lx] < a[y][ly])
      lx++;
    else
      ly++;
  }
  return 0;
}
int main() {
  scanf("%d", &m);
  scanf("%d", &n);
  for (i = 0; i < m; i++) {
    scanf("%d", len + i);
    for (j = 0; j < len[i]; j++) scanf("%d", &a[i][j]);
    sort(a[i], a[i] + len[i]);
  }
  for (i = 0; i < m; i++)
    for (j = i + 1; j < m; j++)
      if (!check(i, j)) {
        cout << "impossible" << endl;
        return 0;
      }
  cout << "possible" << endl;
  return 0;
}
