#include <bits/stdc++.h>
const int maxn = 1e5 + 10;
const int maxm = 1e5 + 3;
using namespace std;
int rd() {
  int tem;
  scanf("%d", &tem);
  return tem;
}
int n;
int a[maxn];
int vis[maxn];
int xunhuan[maxn];
struct node {
  int ind, val, ans;
};
vector<node> vec;
bool cmp(node a, node b) { return a.val < b.val; }
bool cmp_2(node a, node b) { return a.ind < b.ind; }
signed main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    a[i] = n - rd();
    vis[a[i]] += 1;
    vec.push_back((node){i, a[i], -1});
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i] % i) {
      cout << "Impossible" << '\n';
      return 0;
    }
  }
  cout << "Possible" << '\n';
  sort(vec.begin(), vec.end(), cmp);
  int tot = 0;
  for (int i = 0; i < vec.size(); i++) {
    int tem = vec[i].val;
    tot++;
    i -= 1;
    while (tem--) {
      vec[++i].ans = tot;
    }
  }
  sort(vec.begin(), vec.end(), cmp_2);
  for (int i = 0; i < vec.size(); i++) {
    cout << vec[i].ans << ' ';
  }
  return 0;
}
