func_code_string: #include <bits/stdc++.h>   using namespace std;   template <typename T>   inline bool uax(T &x, T y) {     return (y > x) ? x = y, true : false;   }   template <typename T>   inline bool uin(T &x, T y) {     return (y < x) ? x = y, true : false;   }   template <typename T>   void kek(T ans) {     cout << ans << endl;     exit(0);   }   const int MOD = (int)1e9 + 7;   const long long INF = (long long)1e18 + 42;   int main() {     cin.tie(nullptr)->sync_with_stdio(false);     int n;     cin >> n;     vector<vector<int>> a(n);     vector<set<pair<int, int>>> b(3);     for (int i = 0; i < n; ++i) {       int x;       cin >> x;       a[x].push_back(i);     }     vector<int> team(3, 0);     vector<int> ans;     for (int i = 0; i < n; ++i) {       for (int j : a[i]) {         b[i % 3].emplace(i, j);       }       if (b[i % 3].empty()) kek( Impossible );       auto it = b[i % 3].upper_bound({i - team[i % 3], n});       if (it == b[i % 3].begin()) kek( Impossible );       --it;       ans.push_back(it->second);       uax(team[i % 3], i - it->first);       b[i % 3].erase(it);     }     cout <<  Possible n ;     for (int i : ans) cout << 1 + i <<    ;     cout <<   n ;   }   