#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 7;
int ar[MAX], a[MAX];
bool mk[MAX];
vector<int> v[MAX];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, mx = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mk[a[i]] = 1;
    v[a[i]].emplace_back(i);
  }
  int k = 1;
  for (int i = 0; i < MAX; i++) {
    if (mk[i]) {
      while ((int)v[i].size() > 0) {
        int tmp = n - i;
        if ((int)v[i].size() < tmp)
          return !(cout << "Impossible" << '\n');
        else {
          while (tmp--) {
            int value = v[i][0];
            ar[value] = k;
            v[i].erase(v[i].begin());
          }
          k++;
        }
      }
    }
  }
  cout << "Possible" << '\n';
  for (int i = 0; i < n; i++) cout << ar[i] << ' ';
  cout << '\n';
  return 0;
}
