#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  int b[n];
  for (int i = 0; i < n; i++) cin >> a[i], b[i] = 0;
  map<int, vector<int> > mp;
  for (int i = 0; i < n; i++) {
    mp[a[i]].push_back(i);
  }
  int f = 1;
  for (auto it = mp.begin(); it != mp.end(); it++) {
    int k = it->first;
    k = n - k;
    int cnt = 0;
    for (int i = 0; i < it->second.size(); i++) {
      if (cnt >= k) {
        cnt = 0;
        f++;
      }
      b[it->second[i]] = f;
      cnt++;
    }
    f++;
  }
  map<int, int> mp1;
  for (int i = 0; i < n; i++) {
    mp1[b[i]]++;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] != n - mp1[b[i]]) {
      cout << "Impossible";
      return 0;
    }
  }
  cout << "Possible\n";
  for (int i = 0; i < n; i++) {
    cout << b[i] << " ";
  }
  cerr << "Time elapsed : " << clock() * 1000.0 / CLOCKS_PER_SEC << "ms"
       << '\n';
  return 0;
}
