#include <bits/stdc++.h>
using namespace std;
const int K = 19;
const int N = 1 << (K - 1);
int n, m;
struct Item {
  int l, r;
  int lx, rx;
  Item() : l(), r(), lx(), rx() {}
  Item(int _l, int _r, int _lx, int _rx) : l(_l), r(_r), lx(_lx), rx(_rx) {}
};
vector<Item> a[K];
pair<int, int> b[N];
vector<vector<int> > dpMasks[K];
bool dp[N];
vector<int> pref[N], suf[N];
bool ans[N];
void solve(int k, int p) {
  if (k == 0) {
    dpMasks[k][p].push_back(1);
    return;
  }
  if (a[k][p].r - a[k][p].l >= k + 1) {
    dpMasks[k][p].push_back(1 << k);
    return;
  }
  for (int mask = 0; mask < (1 << k); mask++) dp[mask] = 1;
  for (int id = a[k][p].l; id <= a[k][p].r; id++) {
    vector<int> cur;
    for (int mask = 0; mask < (1 << k); mask++) {
      if (!dp[mask]) continue;
      bool good = true;
      for (int i = 0; i < k; i++) {
        if (((mask >> i) & 1) && dp[mask ^ (1 << i)]) {
          good = false;
          break;
        }
      }
      if (good) cur.push_back(mask);
    }
    for (int mask = 0; mask < (1 << k); mask++) dp[mask] = 0;
    solve(k - 1, id);
    for (int mask1 : cur)
      for (int mask2 : dpMasks[k - 1][id])
        if ((mask1 & mask2) == 0) dp[mask1 | mask2] = 1;
    for (int mask = 0; mask < (1 << k); mask++) {
      if (!dp[mask]) continue;
      for (int i = 0; i < k; i++) dp[mask | (1 << i)] = 1;
    }
  }
  dpMasks[k][p].push_back(1 << k);
  for (int mask = 0; mask < (1 << k); mask++) {
    if (!dp[mask]) continue;
    bool good = true;
    for (int i = 0; i < k; i++) {
      if (((mask >> i) & 1) && dp[mask ^ (1 << i)]) {
        good = false;
        break;
      }
    }
    if (good) dpMasks[k][p].push_back(mask);
  }
  return;
}
void markGood(int k, int p) {
  if (k == 0) {
    ans[b[p].second] = 1;
    return;
  }
  for (int i = a[k][p].l; i <= a[k][p].r; i++) markGood(k - 1, i);
  return;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &b[i].first);
    b[i].second = i;
  }
  sort(b, b + n);
  for (int i = 0; i < n; i++)
    a[0].push_back(Item(-1, -1, b[i].first, b[i].first));
  for (int k = 0; k < K - 1; k++) {
    int len = m >> (K - 2 - k);
    int l = 0;
    while (l < (int)a[k].size()) {
      int r = l + 1;
      while (r < (int)a[k].size() && a[k][r - 1].rx + len >= a[k][r].lx) r++;
      a[k + 1].push_back(Item(l, r - 1, a[k][l].lx, a[k][r - 1].rx));
      l = r;
    }
  }
  if (a[K - 1].size() > K) {
    for (int i = 0; i < n; i++) printf("Impossible\n");
    return 0;
  }
  for (int k = 0; k < K; k++) {
    dpMasks[k].resize(a[k].size());
    for (int i = 0; i < (int)dpMasks[k].size(); i++)
      dpMasks[k][i] = vector<int>();
  }
  for (int i = 0; i < (int)a[K - 1].size(); i++) solve(K - 1, i);
  pref[0].push_back(0);
  for (int p = 0; p < (int)a[K - 1].size(); p++) {
    for (int mask = 0; mask < (1 << (K - 1)); mask++) dp[mask] = 0;
    for (int mask1 : pref[p])
      for (int mask2 : dpMasks[K - 1][p]) {
        if ((mask1 & mask2) == 0 && (mask1 | mask2) < (1 << (K - 1)))
          dp[mask1 | mask2] = 1;
      }
    for (int mask = 0; mask < (1 << (K - 1)); mask++) {
      if (!dp[mask]) continue;
      for (int i = 0; i < K - 1; i++) dp[mask | (1 << i)] = 1;
    }
    for (int mask = 0; mask < (1 << (K - 1)); mask++) {
      if (!dp[mask]) continue;
      bool good = 1;
      for (int i = 0; i < K - 1; i++) {
        if (((mask >> i) & 1) && dp[mask ^ (1 << i)]) {
          good = false;
          break;
        }
      }
      if (good) pref[p + 1].push_back(mask);
    }
  }
  suf[(int)a[K - 1].size()].push_back(0);
  for (int p = (int)a[K - 1].size() - 1; p >= 0; p--) {
    for (int mask = 0; mask < (1 << (K - 1)); mask++) dp[mask] = 0;
    for (int mask1 : suf[p + 1])
      for (int mask2 : dpMasks[K - 1][p]) {
        if ((mask1 & mask2) == 0 && (mask1 | mask2) < (1 << (K - 1)))
          dp[mask1 | mask2] = 1;
      }
    for (int mask = 0; mask < (1 << (K - 1)); mask++) {
      if (!dp[mask]) continue;
      for (int i = 0; i < K - 1; i++) dp[mask | (1 << i)] = 1;
    }
    for (int mask = 0; mask < (1 << (K - 1)); mask++) {
      if (!dp[mask]) continue;
      bool good = 1;
      for (int i = 0; i < K - 1; i++) {
        if (((mask >> i) & 1) && dp[mask ^ (1 << i)]) {
          good = false;
          break;
        }
      }
      if (good) suf[p].push_back(mask);
    }
  }
  for (int p = 0; p < (int)a[K - 1].size(); p++) {
    bool good = false;
    for (int mask1 : pref[p])
      for (int mask2 : suf[p + 1])
        if ((mask1 & mask2) == 0) good = true;
    if (good) markGood(K - 1, p);
  }
  for (int i = 0; i < n; i++) {
    if (ans[i])
      printf("Possible\n");
    else
      printf("Impossible\n");
  }
  return 0;
}
