#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  while (cin >> n) {
    vector<pair<int, int> > v(0);
    for (int i = 0; i < n; i++) {
      int a;
      cin >> a;
      v.push_back(make_pair(-n + a, i));
    }
    sort(v.begin(), v.end());
    bool b = true;
    for (int i = 0; i < n; i++) {
      if (i + -(v[i].first) - 1 >= n)
        b = false;
      else if (v[i + -(v[i].first) - 1].first != v[i].first)
        b = false;
      else
        i = i + -(v[i].first) - 1;
    }
    if (!b)
      cout << "Impossible";
    else {
      cout << "Possible\n";
      int arr[n];
      int c = 1;
      for (int i = 0; i < n; i++) {
        for (int j = 0; j < -v[i].first; j++) arr[v[j + i].second] = c;
        c++;
        i = i + -(v[i].first) - 1;
      }
      for (int i = 0; i < n; i++) cout << arr[i] << " ";
    }
    cout << endl;
  }
}
