#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, x = 0L;
  cin >> n;
  vector<long> a(n), v(n);
  bool fp = true;
  long cnt[n];
  memset(cnt, 0, sizeof(cnt));
  multimap<long, long> mp;
  for (long i = 0; i < n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
    mp.insert(make_pair(a[i], i + 1));
  }
  for (long i = 0; i < n; i++) {
    if (cnt[x] > 0) {
      v[i] = x;
      cnt[x]--;
    } else {
      while (cnt[x] == 0 && x > 0) {
        x -= 3;
      }
      if (x < 0 || cnt[x] == 0) {
        fp = false;
        break;
      } else if (cnt[x] > 0) {
        v[i] = x;
        cnt[x]--;
      }
    }
    x++;
  }
  if (fp) {
    cout << "Possible" << endl;
    for (long i = 0; i < n; i++) {
      auto it = mp.find(v[i]);
      cout << it->second << " ";
      mp.erase(it);
    }
    cout << endl;
  } else
    cout << "Impossible" << endl;
}
