#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
struct node {
  int a;
  int cnt;
} s[N];
int main() {
  int n, x;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    s[i].a = n - x;
    s[i].cnt = 0;
  }
  int ans = 1;
  bool flag = true;
  for (int i = 0; i < n; i++) {
    int cnt = 0;
    if (s[i].a == 1) {
      s[i].cnt = ans++;
      continue;
    }
    if (s[i].cnt) continue;
    for (int j = i + 1; j < n; j++) {
      if (!s[j].cnt && s[j].a == s[i].a) {
        cnt++;
        s[j].cnt = ans;
      }
      if (cnt == s[i].a - 1) {
        s[i].cnt = ans++;
        break;
      }
    }
    if (!s[i].cnt) {
      flag = false;
      break;
    }
  }
  if (flag) {
    printf("Possible\n");
    for (int i = 0; i < n; i++) printf("%d ", s[i].cnt);
  } else
    printf("Impossible\n");
  return 0;
}
