#include <bits/stdc++.h>
const int maxn = 200000 + 10;
int repr[maxn], next[maxn], a[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int id = 1; id <= n; id++) {
    int x;
    scanf("%d", &x);
    next[id] = repr[x];
    repr[x] = id;
  }
  int p = 0, now = 0;
  while (repr[now]) {
    a[p++] = repr[now];
    repr[now] = next[repr[now]];
    now++;
    while (repr[now] == 0 && now >= 3) now -= 3;
  }
  if (p == n) {
    puts("Possible");
    for (int i = 0; i < n - 1; i++) printf("%d ", a[i]);
    printf("%d\n", a[n - 1]);
  } else
    puts("Impossible");
  return 0;
}
