#include <bits/stdc++.h>
using namespace std;
struct Node {
  int v, id;
};
const int N = 1e5 + 10;
Node a[N];
int ans[N];
bool cmp(const Node& x, const Node& y) { return x.v < y.v; }
int main() {
  int n, p, cnt;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i].v);
    a[i].v = n - a[i].v;
    a[i].id = i;
  }
  sort(a + 1, a + n + 1, cmp);
  p = 1;
  cnt = 0;
  while (p <= n) {
    if (a[p].v + p - 1 <= n && a[a[p].v + p - 1].v == a[p].v) {
      cnt++;
      for (int i = p; i <= p + a[p].v - 1; i++) ans[a[i].id] = cnt;
      p += a[p].v;
    } else {
      printf("Impossible\n");
      return 0;
    }
  }
  printf("Possible\n");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
