#include <bits/stdc++.h>
using namespace std;
const int maxn = 2 * 100 * 1000 + 100;
int A[maxn];
int B[maxn];
int Ans[maxn];
vector<int> v[maxn];
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    int a;
    cin >> a;
    if (a == 0)
      cout << "Possible" << endl << 1;
    else
      cout << "Impossible";
    return 0;
  }
  for (int i = 1; i <= n; i++)
    cin >> A[i], B[n - 1 - A[i]]++, v[n - 1 - A[i]].push_back(i);
  bool ans = 1;
  for (int i = 1; i <= n - 1; i++)
    if (B[i] % (i + 1) != 0) ans = 0;
  if (ans == 0) {
    cout << "Impossible";
    return 0;
  }
  cout << "Possible" << endl;
  int x = 1;
  while (v[0].size()) {
    Ans[v[0][v[0].size() - 1]] = x;
    x++;
    v[0].pop_back();
  }
  for (int i = 1; i <= n - 1; i++) {
    while (v[i].size()) {
      int j = i + 1;
      while (j) {
        Ans[v[i][v[i].size() - 1]] = x;
        j--;
        v[i].pop_back();
      }
      x++;
    }
  }
  for (int i = 1; i <= n; i++) cout << Ans[i] << " ";
}
