#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j = 0, t, c = 0, k = LLONG_MAX, m, l, ans = 0, x = 0, y;
  cin >> n;
  std::map<long long int, long long int> ma;
  std::vector<pair<long long int, long long int> > v[n + 1];
  long long int a[n];
  for (i = 0; i < n; i++) cin >> a[i], a[i] = n - a[i], ma[a[i]]++;
  for (auto x : ma) {
    if ((x.second) % (x.first)) return cout << "Impossible\n", 0;
  }
  y = 1;
  cout << "Possible\n";
  for (auto x : ma) {
    for (i = 0; i < (x.second) / (x.first); i++, y++)
      v[x.first].push_back({y, x.first});
  }
  for (i = 0; i < n; i++) {
    cout << v[a[i]][v[a[i]].size() - 1].first << " ";
    v[a[i]][v[a[i]].size() - 1].second--;
    if (v[a[i]][v[a[i]].size() - 1].second == 0) v[a[i]].pop_back();
    ;
  }
  return 0;
}
