#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const long long mod = 1e9 + 7;
const int N = 1e5 + 10;
long long freq[N];
long long a[N];
vector<pair<int, int> > temp;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  memset(freq, 0, sizeof(freq));
  temp.clear();
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    a[i] = n - a[i];
    temp.push_back(make_pair(a[i], i));
    freq[a[i]]++;
  }
  sort(temp.begin(), temp.end());
  bool val = true;
  long long cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (freq[i] != 0 and (freq[i] % i) != 0) val = false;
    cnt += freq[i];
  }
  int cur = 1;
  int pos = 0;
  if (val and cnt == n) {
    cout << "Possible" << endl;
    for (int i = 1; i <= n; i++) {
      while (freq[i]) {
        for (int j = 1; j <= i; j++) {
          a[temp[pos].second] = cur;
          pos++;
        }
        freq[i] -= i;
        cur++;
      }
    }
    for (int i = 1; i <= n; i++) cout << a[i] << " ";
  } else
    cout << "Impossible" << endl;
  return 0;
}
