#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  vector<pair<long long, long long>> a(n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i].first;
    a[i].first = n - a[i].first;
    a[i].second = i;
  }
  sort(a.begin(), a.end());
  long long i = 0, cur = 1;
  vector<long long> b(n);
  while (i < n) {
    long long j = i;
    while (j < i + a[i].first) {
      if (a[j].first != a[i].first) {
        cout << "Impossible" << endl;
        return 0;
      }
      b[a[j].second] = cur;
      ++j;
    }
    cur++;
    i = j;
  }
  cout << "Possible" << endl;
  for (long long i = 0; i < n; ++i) cout << b[i] << ' ';
  cout << endl;
  return 0;
}
