#include <bits/stdc++.h>
using namespace std;
int arr[55][55], dp[55][10005];
void solve() {
  int m, n;
  cin >> m >> n;
  for (int i = 0; i < m; i++) {
    int len;
    cin >> len;
    for (int j = 0; j < len; j++) {
      int x;
      cin >> x;
      dp[i][x] = 1;
    }
  }
  for (int i = 0; i < m; i++)
    for (int j = i + 1; j < m; j++)
      for (int k = 0; k < n; k++)
        if (dp[i][k] == dp[j][k] && dp[i][k] == 1) arr[i][j] = 1;
  for (int i = 0; i < m; i++)
    for (int j = i + 1; j < m; j++)
      if (!arr[i][j]) {
        cout << "impossible";
        exit(0);
      }
  cout << "possible";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int qc = 1;
  for (int i = 1; i <= qc; i++) solve();
}
