#include <bits/stdc++.h>
using namespace std;
const int64_t M = 1e5 + 5;
int64_t n, a[M], ans[M];
map<int64_t, vector<int64_t> > m;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int64_t i = 1; i <= n; i++) {
    cin >> a[i];
    m[n - a[i]].push_back(i);
  }
  for (auto &i : m)
    if (i.second.size() % i.first != 0) return cout << "Impossible", 0;
  cout << "Possible" << endl;
  int64_t curr = 0;
  for (auto &i : m) {
    for (int64_t j = 0; j < i.second.size(); j++) {
      if (j % i.first == 0) curr++;
      ans[i.second[j]] = curr;
    }
  }
  for (int64_t i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
