#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, i, j, k, x, y, t;
  cin >> n;
  vector<long long> a(n + 5), v[n + 5];
  for (i = 1; i <= n; i++) {
    cin >> x;
    v[n - x].push_back(i);
  }
  long long cnt = 0;
  for (i = 1; i <= n; i++) {
    if (v[i].size() % i) {
      cout << "Impossible" << endl;
      return 0;
    }
    long long tmp = v[i].size() / i;
    for (j = 0; j < tmp; j++) {
      cnt++;
      for (k = 0; k < i; k++) {
        a[v[i].back()] = cnt;
        v[i].pop_back();
      }
    }
  }
  cout << "Possible" << endl;
  for (i = 1; i <= n; i++) cout << a[i] << " ";
  cout << endl;
}
