#include <bits/stdc++.h>
using namespace std;
vector<int> a[51];
bool compare(int x, int y) {
  for (int i = 0, j = 0; i < a[x].size(), j < a[y].size();) {
    if (a[x][i] < a[y][j]) {
      i++;
    } else if (a[x][i] > a[y][j]) {
      j++;
    } else {
      return true;
    }
  }
  return false;
}
int main() {
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    int s;
    cin >> s;
    int x;
    for (int j = 0; j < s; j++) {
      cin >> x;
      a[i].push_back(x);
    }
    sort(a[i].begin(), a[i].end());
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < i; j++) {
      if (!compare(i, j)) {
        cout << "impossible";
        return 0;
      }
    }
  }
  cout << "possible";
  return 0;
}
