#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i] = n - a[i];
  }
  int b[n];
  int z = 0;
  map<int, int> m;
  map<int, int> k;
  for (int i = 0; i < n; i++) {
    m[a[i]] = 0;
    k[a[i]] = 0;
  }
  int p = 1;
  for (int i = 0; i < n; i++) {
    if (!m[a[i]]) {
      z += a[i];
      k[a[i]] = p;
      m[a[i]] = a[i] - 1;
      b[i] = p;
      p++;
    } else {
      b[i] = k[a[i]];
      m[a[i]]--;
    }
  }
  if (z != n)
    cout << "Impossible"
         << "\n";
  else {
    cout << "Possible"
         << "\n";
    for (int i = 0; i < n; i++) cout << b[i] << " ";
  }
  return 0;
}
