#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n, a[MAXN], b[MAXN], s[MAXN], v[MAXN];
bool check = 0;
void qsort(int a[], int b[], int l, int r) {
  int i = l, j = r, key = a[(l + r) / 2];
  while (i <= j) {
    while (a[i] < key) i++;
    while (a[j] > key) j--;
    if (i <= j) {
      if (i < j) swap(a[i], a[j]), swap(b[i], b[j]);
      i++;
      j--;
    }
  }
  if (i < r) qsort(a, b, i, r);
  if (l < j) qsort(a, b, l, j);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    s[i] = n - a[i] - 1;
    if (s[i] < 0) check = 1;
    v[i] = i;
  }
  if (check == 1) return cout << "Impossible", 0;
  qsort(s, v, 1, n);
  int ok = 1;
  b[v[1]] = 1;
  for (int i = 2; i <= n; i++) {
    if (s[i] == s[i - 1] && s[i - 1] != 0 && i - ok < s[i - 1] + 1)
      b[v[i]] = b[v[i - 1]];
    else {
      if (s[i] != s[i - 1] && i - ok != s[i - 1] + 1) {
        check = 1;
        break;
      }
      if (s[i] != s[i - 1] && i - ok == s[i - 1] + 1)
        b[v[i]] = b[v[i - 1]] + 1, ok = i;
      if (s[i] == s[i - 1] && i - ok >= s[i - 1] + 1)
        b[v[i]] = b[v[i - 1]] + 1, ok = i;
    }
  }
  if (n - ok != s[n]) check = 1;
  if (check == 1) return cout << "Impossible", 0;
  cout << "Possible\n";
  for (int i = 1; i <= n; i++) cout << b[i] << " ";
}
