#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, i, j, k, a;
  cin >> n;
  int A[n], B[n + 1];
  memset(A, 0, sizeof(A));
  memset(B, 0, sizeof(B));
  for (i = 0; i < n; i++) {
    cin >> a;
    A[i] = n - a;
    B[A[i]]++;
  }
  int C[n + 1], D[n + 1];
  memset(C, 0, sizeof(C));
  memset(D, 0, sizeof(D));
  bool flag = true;
  k = 1;
  for (i = 1; i < n + 1; i++) {
    if (B[i] % i == 0) {
      C[i] = k;
      k += (B[i] / i);
    } else {
      flag = false;
      break;
    }
  }
  if (flag) {
    cout << "Possible\n";
    for (i = 0; i < n; i++) {
      a = A[i];
      cout << C[a] + D[a] / a << " ";
      D[a]++;
    }
  } else {
    cout << "Impossible\n";
  }
  return 0;
}
