#include <bits/stdc++.h>
using namespace std;
int n, a[200005], ans[200005], p[200005], q[200005], beg, z;
vector<int> g[200005];
pair<int, int> s[200005];
void next() {
  while (p[s[beg].second]) {
    --beg;
    if (beg < 0) return;
  }
}
int main() {
  scanf("%d", &n);
  beg = n - 1;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    s[i] = make_pair(a[i], i);
    g[a[i]].push_back(i);
  }
  sort(s, s + n);
  for (int i = 0; i < n; ++i) {
    if (q[z] >= (int)g[z].size()) {
      printf("Impossible");
      return 0;
    }
    ans[i] = g[z][q[z]];
    p[g[z][q[z]]] = 1;
    q[z]++;
    z++;
    next();
    if (z - 3 == s[beg].first) {
      z -= 3;
      next();
    } else if (q[z] >= (int)g[z].size()) {
      while (z > 3 && q[z - 3] >= (int)g[z - 3].size()) z -= 3;
      z -= 3;
    }
  }
  printf("Possible\n");
  for (int i = 0; i < n; ++i) printf("%d ", ans[i] + 1);
  return 0;
}
