#include <bits/stdc++.h>
using namespace std;
const int maxn = 200008;
stack<int> s[maxn];
int p[maxn];
int main() {
  int n, a;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a);
    s[a].push(i);
  }
  int i = 0, num = 0;
  while (1) {
    if (s[i].empty() == 0) {
      p[num++] = s[i++].top();
      if (num == n) break;
    } else {
      if (i < 3) break;
      s[--i].pop();
      s[--i].pop();
      s[--i].pop();
    }
  }
  if (num == n) {
    printf("Possible\n");
    for (int i = 0; i < n; i++) {
      printf("%d ", p[i]);
    }
    printf("\n");
  } else {
    printf("Impossible\n");
  }
  return 0;
}
