#include <bits/stdc++.h>
using namespace std;
const long long LINF = 2000000000000000001, mod = 1000000007;
const int MAXN = 200005, INF = 2000000009;
int main() {
  int n;
  cin >> n;
  int a[n], b[n];
  pair<int, int> pr[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i] = n - a[i];
    if (a[i] <= 0) {
      cout << "Impossible";
      return 0;
    }
    pr[i].first = a[i];
    pr[i].second = i;
  }
  fill(b, b + n, -1);
  sort(pr, pr + n);
  for (int i = 0; i < n; i++) {
    int c = pr[i].first;
    for (int j = i; j < i + c; j++) {
      if (pr[j].first != pr[i].first) {
        cout << "Impossible";
        return 0;
      }
      b[pr[j].second] = i + 1;
    }
    i = i + c - 1;
  }
  for (int i = 0; i < n; i++)
    if (b[i] < 1) {
      cout << "Impossible";
      return 0;
    }
  cout << "Possible\n";
  for (int i = 0; i < n; i++) cout << b[i] << " ";
  return 0;
}
