#include <bits/stdc++.h>
using namespace std;
int a[100100];
int b[100100];
vector<int> group_sz_ids[100100];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    group_sz_ids[n - a[i]].push_back(i);
  }
  int id = 1;
  bool possible = true;
  for (int group_sz = 1; group_sz <= n; group_sz++) {
    int cnt = group_sz_ids[group_sz].size();
    if (cnt % group_sz) {
      possible = false;
      break;
    }
    for (int i = 0; i < cnt / group_sz; i++, id++)
      for (int j = 0; j < group_sz; j++) {
        int k = j + i * group_sz;
        b[group_sz_ids[group_sz][k]] = id;
      }
  }
  if (!possible) {
    cout << "Impossible";
    return 0;
  }
  cout << "Possible\n";
  for (int i = 0; i < n; i++) cout << b[i] << ' ';
}
