#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a[n], b[n + 1];
  vector<pair<int, int>> c;
  for (int i = 0; i < n; i++) cin >> a[i];
  unordered_map<long long, long long> mp, mp1;
  vector<vector<int>> v;
  v.assign(n + 1, vector<int>());
  for (int i = 0; i < n; i++) {
    mp[a[i]]++;
    v[n - a[i]].push_back(i + 1);
  }
  for (auto it : mp) {
    c.push_back({it.second / (n - it.first), n - it.first});
  }
  int x = 0;
  for (int i = 0; i < c.size(); i++) x += (c[i].first) * (c[i].second);
  if (x != n)
    cout << "Impossible";
  else {
    int y = 1;
    cout << "Possible\n";
    for (auto it : c) {
      for (int j = 0; j < it.first; j++) {
        for (int k = 0; k < it.second; k++) {
          x = *v[it.second].rbegin();
          v[it.second].pop_back();
          b[x] = y;
        }
        y += 1;
      }
    }
    for (int i = 1; i <= n; i++) cout << b[i] << " ";
  }
}
