#include <bits/stdc++.h>
struct s {
  int r, l;
} c[200010];
int n, i, a[200010], b[200010], d, e, f[200010];
bool k = 1;
bool l(s p, s q) { return (p.r > q.r); }
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &c[i].r);
    c[i].l = i;
  }
  std::sort(c + 1, c + n + 1, l);
  for (i = 1; i <= n; i++) {
    d = f[c[i].r];
    e = c[i].r + 3 * d;
    while (a[e] != 0) {
      e += 3;
      d++;
    }
    if (e >= n) {
      k = 0;
      break;
    }
    a[e] = c[i].l;
    b[e] = d;
    f[c[i].r] = d;
  }
  for (i = 1; i <= n - 1; i++)
    if (b[i - 1] > b[i]) {
      k = 0;
      break;
    }
  if (k) {
    printf("Possible\n");
    for (i = 0; i <= n - 1; i++) printf("%d ", a[i]);
  } else
    printf("Impossible");
}
