#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 5;
bool mp[100][maxn];
int main() {
  int m, n;
  scanf("%d %d", &m, &n);
  for (int i = 1; i <= m; i++) {
    int cnt;
    scanf("%d", &cnt);
    for (int j = 1; j <= cnt; j++) {
      int x;
      scanf("%d", &x);
      mp[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 (mp[i][k] == 1 && mp[j][k] == 1) {
          flag = 1;
          break;
        }
      }
      if (flag == 0) {
        cout << "impossible" << endl;
        return 0;
      }
    }
  }
  cout << "possible" << endl;
  return 0;
}
