#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
vector<long long int> v(100005);
vector<long long int> same[100005];
vector<long long int> answer(100005);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long int n, i, j, c = 1;
    cin >> n;
    for (i = 1; i <= n; i++) {
      cin >> v[i];
      same[n - v[i]].push_back(i);
    }
    for (i = 1; i <= n; i++) {
      if (!same[i].empty()) {
        if (same[i].size() % i != 0) {
          cout << "Impossible";
          return 0;
        }
      }
    }
    cout << "Possible" << '\n';
    for (i = 1; i <= n; i++) {
      if (!same[i].empty()) {
        for (j = 0; j <= same[i].size() - 1; j++) {
          answer[same[i][j]] = c;
          if ((j + 1) % i == 0) c++;
        }
      }
    }
    for (i = 1; i <= n; i++) cout << answer[i] << " ";
  }
  return 0;
}
