#include <bits/stdc++.h>
using namespace std;
int arr[101010];
int occ[101010];
int hat[101010];
int ht = 1;
long long sqs = 0;
vector<int> ks[101010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    arr[i] = x;
    occ[x]++;
    sqs += arr[i];
  }
  if (occ[0]) {
    if (sqs == 0) {
      printf("Possible\n");
      for (int i = 0; i < n; i++) printf("1 ");
      return 0;
    } else {
      printf("Impossible");
      return 0;
    }
  }
  for (int i = 1; i <= n; i++) {
    if ((occ[i] > 0) && ((occ[i] % (n - i)) != 0)) {
      printf("Impossible");
      return 0;
    }
    ks[arr[i]].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    int ss = ks[i].size();
    if (ss == 0) continue;
    int u = n - i;
    for (int j = 0; j < ss; j++) {
      hat[ks[i][j]] = ht + j / u;
    }
    ht += ss / u;
  }
  printf("Possible\n");
  for (int kk = 1; kk <= n; kk++) printf("%d ", hat[kk]);
  return 0;
}
