#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5;
int n, a[MAXN + 10], b[MAXN + 10];
pair<int, int> c[MAXN + 10];
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    c[i] = {n - a[i], i};
  }
  sort(c + 1, c + n + 1);
  int t = 1;
  for (i = 1; i <= n;) {
    int now = c[i].first;
    for (j = 0; j < now; j++) {
      if (j + i > n || now != c[j + i].first) {
        printf("Impossible");
        return 0;
      }
      b[c[i + j].second] = t;
    }
    t++;
    i += j;
  }
  printf("Possible\n");
  for (i = 1; i <= n; i++) printf("%d ", b[i]);
  return 0;
}
