#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
long long a[200000];
long long ans[200000];
map<int, int> m;
int main() {
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    v.push_back({a[i], i});
  }
  sort(v.begin(), v.end());
  int cur = 1, cnt = 0;
  for (int i = 0; i < n; i++) {
    cnt++;
    ans[v[i].second] = cur;
    m[cur]++;
    if (cnt == n - v[i].first) {
      cnt = 0;
      cur++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (m[ans[i]] != n - a[i]) {
      cout << "Impossible";
      return 0;
    }
  }
  cout << "Possible" << endl;
  for (int i = 0; i < n; i++) cout << ans[i] << ' ';
}
