#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int f = 1;
  map<int, int> m;
  map<int, vector<int> > m1;
  map<int, int>::iterator itr;
  vector<int> v, v1;
  for (int i = 0; i < n; i++) {
    v1.push_back(0);
    int x;
    cin >> x;
    m[x] += 1;
    m1[x].push_back(i);
    v.push_back(x);
  }
  int a = 1;
  for (itr = m.begin(); itr != m.end(); itr++) {
    while (itr->second >= n - itr->first) {
      int t = n - itr->first;
      while (t > 0) {
        v1[m1[itr->first][0]] = a;
        m1[itr->first].erase(m1[itr->first].begin());
        t -= 1;
      }
      a += 1;
      itr->second -= n - itr->first;
    }
    if (itr->second != 0) {
      f = 0;
      break;
    }
  }
  if (f == 0)
    cout << "Impossible" << endl;
  else {
    cout << "Possible" << endl;
    for (int i = 0; i < v1.size(); i++) cout << v1[i] << " ";
    cout << endl;
  }
}
