#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
int n, co, a[N], b[N];
vector<int> V[N];
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]), V[n - a[i]].push_back(i);
  for (int i = (1); i <= (n); i++) {
    int tot = 0, ed = V[i].size() - 1;
    if (~ed) co++;
    for (int j = (0); j <= (ed); j++) {
      b[V[i][j]] = co;
      tot++;
      if (tot == i) tot = 0, co++;
    }
    if (tot) {
      puts("Impossible");
      return 0;
    }
  }
  puts("Possible");
  for (int i = (1); i <= (n); i++) printf("%d ", b[i]);
  return 0;
}
