#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10, mod = 1e9 + 7, INF = 0x3f3f3f3f;
vector<int> v[100];
bool check(vector<int>& a, vector<int>& b) {
  int i = 0, j = 0;
  while (i < int(a.size()) && j < int(b.size())) {
    if (a[i] < b[j])
      ++i;
    else if (a[i] > b[j])
      ++j;
    else
      return 1;
  }
  return 0;
}
int main() {
  int n, m;
  cin >> m >> n;
  for (int i = 1; i <= m; ++i) {
    int s;
    scanf("%d", &s);
    for (int j = 0; j < s; ++j) {
      int a;
      scanf("%d", &a);
      v[i].push_back(a);
    }
    sort(v[i].begin(), v[i].end());
  }
  for (int i = 1; i <= m; ++i)
    for (int j = i + 1; j <= m; ++j)
      if (!check(v[i], v[j])) {
        cout << "impossible";
        return 0;
      }
  cout << "possible";
  return 0;
}
