#include <bits/stdc++.h>
int next[200000 + 1], ii[200000 + 1];
int link(int q, int i) {
  static int _ = 1;
  next[_] = q;
  ii[_] = i;
  return _++;
}
int main() {
  static int aa[200000], qq[200000];
  int n, i, p, p0, p1, p2, a, r, cnt;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a);
    aa[a] = link(aa[a], i);
  }
  p0 = (n - 1) / 3 * 3;
  p1 = (n - 2) / 3 * 3 + 1;
  p2 = (n - 3) / 3 * 3 + 2;
  for (a = 0, cnt = 0; cnt < n; a++) {
    if (!aa[a]) {
      r = a % 3;
      p = r == 0 ? p0 : r == 1 ? p1 : p2;
      while (p >= 0 && !aa[p]) p -= 3;
      if (p < 0 || p > a) {
        printf("Impossible\n");
        return 0;
      }
      a = r == 0 ? (p0 = p) : r == 1 ? (p1 = p) : (p2 = p);
    }
    qq[cnt++] = ii[aa[a]];
    aa[a] = next[aa[a]];
  }
  printf("Possible\n");
  for (i = 0; i < n; i++) printf("%d ", qq[i]);
  printf("\n");
  return 0;
}
