#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 7;
const long long mod = 1e9 + 7;
struct node {
  int x, num, ans;
} b[N];
int a[N];
bool cmp(node a, node b) { return a.num < b.num; }
bool cmp1(node a, node b) { return a.x < b.x; }
int main() {
  int n, sum = 0;
  scanf("%d", &n);
  bool mark = true;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    b[i].num = n - a[i];
    b[i].x = i;
    if (b[i].num <= 0) mark = false;
  }
  sort(b + 1, b + 1 + n, cmp);
  b[0].num = -1;
  b[0].ans = 0;
  int tmp = -1;
  for (int i = 1; i <= n; i++) {
    if (b[i].num == b[i - 1].num) {
      if (tmp >= b[i].num) {
        b[i].ans = b[i - 1].ans + 1;
        if (b[i].ans > n) mark = false;
        tmp = 1;
      } else {
        b[i].ans = b[i - 1].ans;
        tmp++;
      }
    } else {
      b[i].ans = b[i - 1].ans + 1;
      if (b[i - 1].num != tmp) mark = false;
      if (b[i].ans > n) mark = false;
      tmp = 1;
    }
  }
  if (tmp != b[n].num) mark = false;
  if (!mark)
    puts("Impossible");
  else {
    puts("Possible");
    sort(b + 1, b + 1 + n, cmp1);
    for (int i = 1; i <= n; i++) {
      printf("%d", b[i].ans);
      if (i == n)
        puts("");
      else
        printf(" ");
    }
  }
  return 0;
}
