#include <bits/stdc++.h>
using namespace std;
vector<int> f[100005];
int col[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    int x;
    scanf("%d", &x);
    f[n - x].push_back(i);
  }
  if (((int)f[0].size())) {
    if (((int)f[0].size()) != n) {
      puts("Impossible");
      return 0;
    }
    puts("Possible");
    for (int i = 1; i <= n; ++i) printf("1 ");
    return 0;
  }
  int cnt = 1;
  bool check = 1;
  for (int u = 1; u <= n; ++u) {
    if (((int)f[u].size())) {
      if (((int)f[u].size()) % u == 0) {
        for (int i = 0; i <= ((int)f[u].size()) - 1; ++i) {
          int v = f[u][i];
          col[v] = cnt + (i / u);
        }
        cnt += ((int)f[u].size()) / u;
      } else {
        check = 0;
        break;
      }
    }
  }
  if (!check)
    puts("Impossible");
  else {
    puts("Possible");
    for (int i = 1; i <= n; ++i) printf("%d ", col[i]);
  }
}
