#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 5e5 + 4;
int main() {
  int n, m;
  scanf("%d", &m);
  scanf("%d", &n);
  int a[m][n + 4];
  for (int i = 0; i < m; i++)
    for (int j = 0; j < n + 1; j++) a[i][j] = 0;
  for (int i = 0; i < m; i++) {
    int k;
    scanf("%d", &k);
    for (int j = 0; j < k; j++) {
      int temp;
      scanf("%d", &temp);
      a[i][temp] = 1;
    }
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < m; j++) {
      int f = 0;
      for (int k = 1; k < n + 1; k++)
        if (a[i][k] == 1 && a[j][k] == 1) f = 1;
      if (f == 0) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
  return 0;
}
