#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, x[N], d[20], id, dep;
struct Array {
  int L[N], R[N], l[N], r[N], cnt;
  void init(int dep);
} a[20];
void Array::init(int dep) {
  int dis = d[dep];
  cnt++;
  L[1] = R[1] = x[1];
  for (int i = 2; i <= n; i++) {
    if (x[i] <= R[cnt] + dis)
      R[cnt] = x[i];
    else
      cnt++, L[cnt] = R[cnt] = x[i];
  }
  int m = a[dep + 1].cnt, *ll = a[dep + 1].L, *rr = a[dep + 1].R;
  l[0] = r[0] = 1;
  for (int i = 1; i <= cnt; i++) {
    for (l[i] = l[i - 1]; l[i] < m && rr[l[i]] < L[i]; l[i]++)
      ;
    for (r[i] = r[i - 1]; r[i] < m && ll[r[i] + 1] <= R[i]; r[i]++)
      ;
  }
}
int q[20][N], size[20];
inline void push(int h, int v) {
  for (int i = a[h].l[v]; i <= a[h].r[v]; i++) q[h + 1][++size[h + 1]] = i;
}
bool check(int h) {
  if (!size[h]) return 1;
  if (size[h] > dep - h + 1) return 0;
  for (int i = 1; i <= size[h]; i++) {
    size[h + 1] = 0;
    for (int j = 1; j <= size[h]; j++)
      if (i != j) push(h, q[h][j]);
    if (check(h + 1)) return 1;
  }
  return 0;
}
bool ans[N], ok[N];
int main() {
  scanf("%d%d", &n, &d[0]);
  while (d[dep]) d[dep + 1] = d[dep] >> 1, dep++;
  a[dep].cnt = n;
  for (int i = 1; i <= n; i++)
    scanf("%d", &x[i]), a[dep].L[i] = a[dep].R[i] = x[i];
  for (int i = dep - 1; i >= 0; i--) a[i].init(i);
  for (int i = 1; i <= a[0].cnt; i++) {
    size[1] = 0;
    for (int j = 1; j <= a[0].cnt; j++)
      if (i != j) push(0, j);
    ok[i] = check(1);
  }
  for (int i = 1, p = 1; i <= n; i++) {
    while (x[i] > a[0].R[p]) p++;
    puts(ok[p] ? "Possible" : "Impossible");
  }
  return 0;
}
