#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
map<long long, long long> mp;
vector<int> ara[100005];
int ans[100005];
int main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    x = n - x;
    if (!mp[x]) v.push_back(x);
    mp[x]++;
    ara[x].push_back(i);
  }
  long long sum = 0;
  for (int i = 0; i < v.size(); i++) {
    if (mp[v[i]] % v[i] != 0) {
      cout << "Impossible" << endl;
      return 0;
    }
    sum += mp[v[i]];
  }
  if (sum != n) {
    cout << "Impossible" << endl;
    return 0;
  }
  cout << "Possible" << endl;
  int id = 1;
  for (int i = 0; i < v.size(); i++) {
    long long wow = mp[v[i]] / v[i];
    for (long long j = 0; j < wow; j++) {
      for (long long k = 0; k < v[i]; k++) {
        ans[ara[v[i]][j * v[i] + k]] = id;
      }
      id++;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
