#include <bits/stdc++.h>
using namespace std;
const int N = 100100;
int n, res[N];
pair<int, int> a[N];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i].first);
    a[i].second = i;
    a[i].first = n - a[i].first;
  }
  sort(a, a + n);
  reverse(a, a + n);
  for (int i = 0, j = 1; i < n;) {
    int k = i + a[i].first - 1;
    if (k >= n) {
      puts("Impossible");
      exit(0);
    }
    for (int l = i; l <= k; l++) {
      if (a[l].first != a[i].first) {
        puts("Impossible");
        exit(0);
      }
      res[a[l].second] = j;
    }
    j++;
    i = k + 1;
  }
  puts("Possible");
  for (int i = 0; i < n; i++) {
    printf("%d ", res[i]);
  }
  puts("");
  return 0;
}
