#include <bits/stdc++.h>
using namespace std;
int Count(int ar[], int m, int n) {
  int count = 0, i;
  for (i = 0; i < n; i++) {
    if (ar[i] == m) {
      count++;
    }
  }
  return count;
}
void change(int br[], int ar[], int n, int clr, int d, int m) {
  int count = 0, i;
  for (i = 0; i < n; i++) {
    if (ar[i] == m) {
      count++;
      br[i] = ceil(float(count) / d) + clr;
      ar[i] = -1;
    }
  }
}
int main() {
  int n, i, cnt = 0;
  cin >> n;
  int ar[n], br[n];
  for (i = 0; i < n; i++) {
    br[i] = 0;
  }
  for (i = 0; i < n; i++) {
    cin >> ar[i];
    if (ar[i] == 0) {
      cnt++;
    }
  }
  if (cnt == n) {
    cout << "Possible\n";
    for (i = 0; i < n; i++) {
      cout << 1 << " ";
    }
    return 0;
  }
  if (cnt != 0) {
    cout << "Impossible";
    return 0;
  }
  int m, count, clr = 0;
  m = *max_element(ar, ar + n);
  while (m != -1) {
    m = *max_element(ar, ar + n);
    count = Count(ar, m, n);
    if ((n - count) > m) {
      cout << "Impossible";
      return 0;
    }
    if (m == n - count) {
      change(br, ar, n, clr, count, m);
      clr++;
    } else {
      int bp = m - (n - count);
      if (bp % (count - bp) == 0) {
        change(br, ar, n, clr, count - bp, m);
        clr += count / (count - bp);
      } else {
        cout << "Impossible";
        return 0;
      }
    }
    m = *max_element(ar, ar + n);
  }
  cout << "Possible\n";
  for (i = 0; i < n; i++) {
    cout << br[i] << " ";
  }
  return 0;
}
