#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, k = 1, flag = 0;
int sum[maxn], num[maxn], num1[maxn], ans[maxn], cou[maxn], dis[maxn];
void check() {
  for (int i = 1; i <= n; i++) cou[ans[i]]++;
  for (int i = 1; i <= n; i++)
    if (cou[ans[i]] + sum[i] != n) flag = 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &sum[i]);
    num[sum[i]] = n - sum[i];
    cou[sum[i]]++;
  }
  for (int i = 1; i <= n; i++) {
    if (num[sum[i]] > cou[sum[i]]) {
      flag = 1;
    }
    num1[sum[i]] = num[sum[i]];
  }
  dis[sum[1]] = ans[1] = 1;
  for (int i = 2; i <= n; i++) {
    if (dis[sum[i]] == 0) {
      ans[i] = dis[sum[i]] = ++k;
    } else {
      if (num[sum[i]] == cou[sum[i]]) {
        ans[i] = dis[sum[i]];
      } else {
        if (num[sum[i]] > 1) {
          ans[i] = dis[sum[i]];
          num[sum[i]]--;
        } else {
          ans[i] = dis[sum[i]] = ++k;
          num[sum[i]] = num1[sum[i]];
        }
      }
    }
  }
  fill(cou, cou + (n + 1), 0);
  check();
  if (k > n || flag)
    printf("Impossible\n");
  else {
    printf("Possible\n");
    for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
