#include <bits/stdc++.h>
using namespace std;
long long nod(long long a, long long b) {
  while (a != 0 && b != 0)
    if (a > b)
      a %= b;
    else
      b %= a;
  return a + b;
}
long long nok(long long a, long long b) { return (a * b) / nod(a, b); }
long long binpow(long long a, long long n) {
  if (n == 0) return 1;
  if (n % 2 == 1)
    return binpow(a, n - 1) * a;
  else
    return binpow(a * a, n / 2);
}
bool isprime(long long a) {
  for (int i = 2; i <= sqrt(a); ++i)
    if (a % i == 0) return false;
  return true;
}
int main() {
  cout.sync_with_stdio(false);
  cin.sync_with_stdio(false);
  cin.tie();
  int n;
  map<int, int> m;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    a[i] = n - x;
    m[n - x]++;
  }
  int num = n;
  for (auto x : m) {
    if (x.second % x.first != 0) {
      cout << "Impossible";
      return 0;
    }
    int k = 0;
    for (int i = 0; i < n; ++i) {
      if (a[i] == x.first) {
        a[i] = num;
        k++;
      }
      if (k >= x.first) num--, k = 0;
    }
  }
  cout << "Possible" << endl;
  for (int i = 0; i < n; ++i) cout << a[i] << " ";
}
