#include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     int n;     cin >> n;     map<int, vector<int>> frec;     for (int i = 0; i < n; i++) {       int val;       cin >> val;       frec[val].push_back(i);     }     int x = 0;     vector<int> ans(n);     for (int i = 0; i < n; i++) {       while (frec[x].empty() && x >= 3) x -= 3;       if (frec[x].empty()) {         cout <<  Impossible n ;         return 0;       }       ans[i] = frec[x].back() + 1;       frec[x].pop_back();       x++;     }     cout <<  Possible n ;     for (int i = 0; i < n; i++) cout << ans[i] <<    ;     return 0;   }   