#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 10, INF = 0x3f3f3f3f;
const long long mod = 1e9 + 7, LINF = 0x3f3f3f3f3f3f3f3f;
;
const double eps = 1e-8, Pi = 2 * acos(0);
int n, m;
vector<int> a[55];
int vis[10050];
int check(int x, int y) {
  memset(vis, 0, sizeof(vis));
  for (int i = 0; i < a[x].size(); i++) vis[a[x][i]] = 1;
  for (int i = 0; i < a[y].size(); i++) {
    if (vis[a[y][i]]) return 1;
  }
  return 0;
}
void solve() {
  scanf("%d%d", &m, &n);
  for (int i = 0; i < m; i++) {
    int t;
    scanf("%d", &t);
    for (int j = 0; j < t; j++) {
      int x;
      scanf("%d", &x);
      a[i].push_back(x);
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = i + 1; j < m; j++) {
      if (!check(i, j)) {
        printf("impossible\n");
        return;
      }
    }
  }
  printf("possible\n");
}
int main() {
  int ce, c = 1, flag = 1;
  solve();
  return 0;
}
