#include <bits/stdc++.h>
using namespace std;
vector<int> v[100008];
int arr[100008];
int main() {
  int n;
  while (cin >> n) {
    memset(arr, 0, sizeof arr);
    for (int i = 1; i <= n; i++) {
      int x, z;
      cin >> x;
      z = n - x;
      v[z].push_back(i);
    }
    int cnt = 1, y;
    for (int i = 1; i <= n; i++) {
      y = v[i].size();
      if (y % i != 0) {
        cout << "Impossible" << endl;
        return 0;
      } else {
        for (int j = 0; j < y; j += i) {
          for (int k = j; k <= j + i - 1; k++) {
            arr[v[i][k]] = cnt;
          }
          cnt++;
        }
      }
    }
    cout << "Possible" << endl;
    for (int i = 1; i <= n; i++) cout << arr[i] << " ";
    cout << endl;
    for (int i = 1; i <= n; i++) v[i].clear();
  }
  return 0;
}
