#include <bits/stdc++.h>
using namespace std;
const long long int OO = 2e7;
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
bool sort_p(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  int n;
  cin >> n;
  vector<int> a(n);
  vector<int> b(n, 0);
  vector<bool> s(n + 1);
  vector<int> t(n + 1);
  bool k = false, q = false;
  for (int i = 0; i < (int)(n); ++i) {
    cin >> a[i];
    if (a[i] == 0) k = true;
    if (a[i] != 0 && k) q = true;
    s[n - a[i]] = true;
    t[a[i]]++;
  }
  if (k) {
    for (int i = 0; i < (int)(n); ++i)
      if (a[i] != 0) {
        cout << "Impossible";
        return 0;
      }
  }
  if (k) {
    cout << "Possible\n";
    for (int i = 0; i < (int)(n); ++i) cout << 1 << " ";
    return 0;
  }
  long long int sum = 0;
  for (int i = 0; i < (int)(n); ++i) {
    sum = t[i];
    if (n - i != 0 && t[i] != 0 && sum % (n - i)) {
      cout << "Impossible";
      return 0;
    }
  }
  vector<pair<int, int>> p;
  for (int i = 0; i < (int)(n); ++i) {
    pair<int, int> r = make_pair(n - a[i], i);
    p.push_back(r);
  }
  sort(((p).begin()), ((p).end()), sort_p);
  int l = 1;
  int j = 0;
  for (int i = 0; i < ((int)((p).size())); ++i) {
    for (j = 0; j < p[i].first; j++) {
      b[p[i + j].second] = l;
    }
    i = i + j - 1;
    l++;
  }
  if (sum > n) {
    cout << "Impossible";
    return 0;
  }
  cout << "Possible\n";
  for (int i = 0; i < (int)(n); ++i) cout << b[i] << " ";
}
