#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e4 + 100;
const int mod = (int)1e9 + 7;
const long long INF = 0x7fffffff;
int vis[55][maxn] = {
    0,
};
int main() {
  int n, m;
  cin >> m >> n;
  for (int i = (1); i <= (m); ++i) {
    int num;
    scanf("%d", &num);
    while (num--) {
      int x;
      scanf("%d", &x);
      vis[i][x] = 1;
    }
  }
  for (int i = (1); i <= (m); ++i)
    for (int j = (1); j <= (m); ++j) {
      int flag = 0;
      for (int k = (1); k <= (n); ++k)
        if (vis[i][k] && vis[j][k]) {
          flag = 1;
          break;
        }
      if (!flag) return puts("impossible"), 0;
    }
  return puts("possible"), 0;
}
