#include <bits/stdc++.h>
using namespace std;
vector<int> v[100005];
int cap[100005];
int main() {
  int n, c = 1;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int a, same;
    scanf("%d", &a);
    same = n - a;
    v[same].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    int sz = v[i].size();
    if (sz % i) {
      printf("Impossible\n");
      return 0;
    } else if (sz) {
      for (int j = 0; j < sz; j += i) {
        for (int k = 0; k < i; k++) cap[v[i][j + k]] = c;
        c++;
      }
    }
  }
  printf("Possible\n");
  for (int i = 1; i <= n; i++) printf("%d ", cap[i]);
  printf("\n");
  return 0;
}
