#include <bits/stdc++.h>
using namespace std;
inline long long max(long long a, long long b) { return a > b ? a : b; }
inline long long min(long long a, long long b) { return a < b ? a : b; }
void scan(int &x) {
  bool neg = false;
  register int c;
  x = 0;
  c = getchar();
  if (c == '-') {
    neg = true;
    c = getchar();
  }
  for (; (c > 47 && c < 58); c = getchar()) x = (x << 1) + (x << 3) + c - 48;
  if (neg) x *= -1;
}
vector<int> data[100009];
long long frq[100009];
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      frq[a[i]]++;
    }
    int ans[n + 1];
    for (int i = 0; i < n; i++) {
      int req = n - a[i];
      data[req].push_back(i);
      if (frq[a[i]] % req != 0) {
        cout << "Impossible" << endl;
        return 0;
      }
      if (data[req].size() == req) {
        for (auto u : data[req]) {
          ans[u] = i + 1;
        }
        data[req].clear();
      }
    }
    cout << "Possible" << endl;
    for (int i = 0; i < n; i++) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
