#include <bits/stdc++.h>
using namespace std;
int arr[100025], num[100025], tmp_[100025], last[100025];
stack<int> ans_;
vector<int> xb[100025];
map<int, int> mp;
bool flag_[100025];
int flag[100025];
int main() {
  int n, cnt = 0, cnt_ = 0;
  long long ans = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &arr[i]);
    xb[n - arr[i]].push_back(i);
    if (flag[n - arr[i]] == 0) {
      ans_.push(n - arr[i]);
      ans += n - arr[i];
    }
    flag[n - arr[i]]++;
    if (flag[n - arr[i]] - tmp_[n - arr[i]] > n - arr[i])
      ans += n - arr[i], tmp_[n - arr[i]] += n - arr[i];
  }
  if (ans != n) {
    printf("Impossible\n");
  } else {
    int Kase = 1;
    printf("Possible\n");
    while (!ans_.empty()) {
      int tmp = ans_.top();
      ;
      ;
      ans_.pop();
      if (tmp == 1) {
        int sz = xb[1].size();
        for (int i = 0; i < sz; ++i) {
          ;
          ;
          mp[xb[1][i]] = Kase;
          Kase++;
        }
      } else {
        int sz = xb[tmp].size();
        for (int i = 0; i < sz; ++i) {
          ;
          ;
          mp[xb[tmp][i]] = Kase;
          last[tmp]++;
          if (last[tmp] % tmp == 0) Kase++;
        }
        last[tmp] += tmp;
      }
    }
    for (int i = 1; i <= n; ++i)
      i == n ? printf("%d\n", mp[i]) : printf("%d ", mp[i]);
  }
  return 0;
}
