#include <bits/stdc++.h>
using namespace std;
int a[100010];
vector<int> v[100010];
int op[100010];
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a[i] = n - x;
    v[n - x].push_back(i);
  }
  bool ok = 1;
  for (int i = 1; i <= n; i++) {
    if (v[i].size() % i) {
      ok = 0;
      break;
    }
  }
  if (!ok) {
    cout << "Impossible" << endl;
    return 0;
  }
  cout << "Possible" << endl;
  int col = 1;
  for (int i = 1; i <= n; i++) {
    if (!v[i].empty()) {
      int cnt = 0;
      for (int j = 0; j < v[i].size(); j++) {
        op[v[i][j]] = col;
        cnt++;
        if (cnt == i) {
          cnt = 0;
          col++;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << op[i] << " ";
  }
  cout << endl;
}
