#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
vector<long long int> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, i;
  cin >> n;
  long long int a[n], b[N];
  for (i = 0; i < n; i++) cin >> a[i];
  vector<long long int> v[N];
  for (i = 0; i < n; i++) v[a[i]].push_back(i);
  long long int xx = 1;
  long long int yy = 1;
  for (i = 0; i < N; i++) {
    for (long long int j = 0; j < v[i].size(); j++) {
      long long int cnt = n - a[v[i][j]];
      for (long long int k = j; k < v[i].size() && cnt; k++) {
        b[v[i][j]] = xx;
        cnt--;
        j++;
      }
      j--;
      xx++;
      if (cnt != 0) {
        cout << "Impossible";
        return 0;
      }
    }
  }
  cout << "Possible\n";
  for (i = 0; i < n; i++) cout << b[i] << " ";
  return 0;
}
