#include <bits/stdc++.h>
using namespace std;
int n;
int a[100005];
int ans[200005];
vector<int> q[200005];
map<int, int> m;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i] = n - a[i];
    m[a[i]]++;
    q[a[i]].push_back(i);
  }
  for (auto v : m) {
    if (v.second % v.first != 0) {
      cout << "Impossible" << endl;
      return 0;
    }
  }
  cout << "Possible" << endl;
  int num = 1;
  for (auto v : m) {
    int tt = v.second / v.first;
    int tv = 0;
    for (int i = 0; i < tt; i++) {
      for (int j = 0; j < v.first; j++) {
        int ti = q[v.first][tv++];
        ans[ti] = num;
      }
      num++;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
