#include <bits/stdc++.h>
using namespace std;
const int MAX = 2e5 + 11;
const int MAXN = 5e7 + 1;
const int BITMAX = 18;
const int INF = 1e9 + 2;
const long long LLINF = 1e17 + 3;
const int MOD = 1e9 + 7;
const long double Pi = acos(-1);
pair<int, int> a[MAX];
int res[MAX];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i].first), a[i].second = i;
  int it = 1;
  sort(a, a + n);
  for (int i = 0; i < n; ++i) {
    int now = it++;
    int cur = a[i].first;
    if (i > cur) return puts("Impossible"), 0;
    int en = n - cur;
    for (int j = i; j < i + en; ++j) {
      res[a[j].second] = now;
      if (a[j].first != cur) return puts("Impossible"), 0;
    }
    i += en;
    i--;
  }
  puts("Possible");
  for (int i = 0; i < n; ++i) printf("%d ", res[i]);
  return 0;
}
