#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  map<int, vector<int>> m;
  for (int i = 0; i < n; i++) {
    int l;
    cin >> l;
    m[n - l].push_back(i);
  }
  vector<int> res(n);
  int ctr = 1;
  for (const auto &v : m) {
    int y = v.first;
    if ((int)(v.second).size() % y != 0) {
      cout << "Impossible\n";
      return 0;
    }
    int i = 0;
    for (const auto &o : v.second) {
      res[o] = ctr + (i / y);
      ++i;
    }
    ctr += i / y;
  }
  cout << "Possible\n";
  for (const auto &u : res) cout << u << " ";
  cout << endl;
}
