#include <bits/stdc++.h>
using namespace std;
int arr[200100], que[200100];
vector<int> rec[200100];
int main() {
  ios::sync_with_stdio(false);
  int n, tmp, mx = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> tmp;
    rec[tmp].push_back(i);
    mx = max(mx, tmp);
    arr[tmp]++;
  }
  int cnt = 0, pos = 0;
  while (cnt < n && arr[pos] > 0) {
    que[cnt++] = rec[pos].back();
    rec[pos].pop_back();
    arr[pos]--;
    if (pos == mx) {
      pos++;
      while (pos >= 3 && arr[pos] == 0) pos -= 3;
      while (arr[mx] == 0) mx--;
    } else
      pos++;
  }
  if (cnt == n) {
    cout << "Possible\n";
    for (int i = 0; i < n; i++) cout << que[i] << (i == n - 1 ? "\n" : " ");
  } else
    cout << "Impossible\n";
}
