#include <bits/stdc++.h>
using namespace std;
struct node {
  int num, pos, vis;
} a[200050];
int n, m;
int cmp1(node x, node y) { return x.num < y.num; }
int ans[200050];
int bsearch(int x) {
  int l = 1, r = n, flag = -1;
  while (l <= r) {
    int mid = (r + l) / 2;
    if (x > a[mid].num)
      l = mid + 1;
    else if (x < a[mid].num)
      r = mid - 1;
    if (x == a[mid].num) {
      if (a[mid].vis == 0) {
        flag = mid;
        r = mid - 1;
      } else
        l = mid + 1;
    }
  }
  if (flag != -1) {
    a[flag].vis = 1;
    return a[flag].pos;
  }
  return -1;
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i].num);
    a[i].pos = i;
    a[i].vis = 0;
  }
  sort(a + 1, a + 1 + n, cmp1);
  int x = 0;
  for (i = 1; i <= n; i++) {
    int tmp = bsearch(x);
    if (tmp == -1) {
      while (x >= 3) {
        x -= 3;
        tmp = bsearch(x);
        if (tmp > 0) break;
      }
    }
    if (tmp == -1) break;
    ans[i] = tmp;
    x++;
  }
  if (i <= n)
    printf("Impossible\n");
  else {
    printf("Possible\n");
    for (i = 1; i <= n; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
