#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 200000;
int n;
int a[MAXN];
bool mycmp(const int &p, const int &q) {
  if (a[p] != a[q]) return a[p] < a[q];
  return p < q;
}
int fst[3], prv[MAXN], nxt[MAXN];
int order[MAXN];
int at[3];
int ret[MAXN], nret;
bool create() {
  nret = 0;
  int want = 0;
  while (nret < n) {
    int x = want % 3;
    if (at[x] == -1) break;
    if (a[at[x]] > want) return false;
    while (a[at[x]] < want && nxt[at[x]] != -1 && a[nxt[at[x]]] <= want)
      at[x] = nxt[at[x]];
    ret[nret++] = at[x] + 1;
    want = a[at[x]] + 1;
    if (prv[at[x]] != -1)
      nxt[prv[at[x]]] = nxt[at[x]];
    else
      fst[x] = nxt[at[x]];
    if (nxt[at[x]] != -1) prv[nxt[at[x]]] = prv[at[x]];
    int natx = nxt[at[x]] != -1 ? nxt[at[x]] : prv[at[x]];
    nxt[at[x]] = prv[at[x]] = -1;
    at[x] = natx;
  }
  return nret >= n;
}
void run() {
  scanf("%d", &n);
  for (int i = (0); i < (n); ++i) scanf("%d", &a[i]);
  for (int i = (0); i < (n); ++i) order[i] = i;
  sort(order, order + n, mycmp);
  for (int i = (0); i < (3); ++i) fst[i] = -1;
  for (int i = n - 1; i >= 0; --i) {
    int idx = order[i], x = a[idx] % 3;
    prv[idx] = -1;
    nxt[idx] = fst[x];
    fst[x] = idx;
    if (nxt[idx] != -1) prv[nxt[idx]] = idx;
  }
  for (int i = (0); i < (3); ++i) at[i] = fst[i];
  if (!create()) {
    printf("Impossible\n");
    return;
  }
  printf("Possible\n");
  for (int i = (0); i < (nret); ++i) {
    if (i != 0) printf(" ");
    printf("%d", ret[i]);
  }
  puts("");
}
int main() {
  run();
  return 0;
}
