#include <bits/stdc++.h>
using namespace std;
void init() {
  freopen("B.inp", "r", stdin);
  freopen("B.out", "w", stdout);
}
struct point {
  int stt;
  int pos;
  int val;
} a[100000 + 7] = {0};
int dem[100000 + 7] = {0};
bool cmp(point a, point b) { return a.stt > b.stt; }
bool cmp1(point a, point b) { return a.pos < b.pos; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].stt;
    a[i].pos = i;
  }
  sort(a + 1, a + 1 + n, cmp);
  a[0].stt = -1;
  int dem1 = 0;
  int j = 0;
  for (int i = 1; i <= n; i++) {
    j++;
    int tmp = (n - i + 1) - (a[i].stt - (i - 1));
    while (tmp-- && i <= n) {
      a[i].val = j;
      dem[j]++;
      i++;
    }
    i--;
  }
  sort(a + 1, a + 1 + n, cmp1);
  bool check = true;
  for (int i = 1; i <= n; i++) {
    if (n - dem[a[i].val] != a[i].stt) {
      check = false;
      break;
    }
  }
  if (check == false) {
    cout << "Impossible";
  } else {
    cout << "Possible"
         << "\n";
    for (int i = 1; i <= n; i++) {
      cout << a[i].val << ' ';
    }
  }
}
