func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1e5 + 5;   int n, ar[N];   char mark[N] = {};   int sz[N] = {};   priority_queue<pair<int, int>, vector<pair<int, int> > > pq;   int main(void) {     cin.tie(0);     ios::sync_with_stdio(0);     cin >> n;     for (int i = 0; i < n; ++i) cin >> ar[i];     for (int i = 0; i < n; ++i) {       if (ar[i] != 0) {         pq.push(make_pair(ar[i], i));       } else {         sz[i] = min(3, (int)pq.size());         int tmp = sz[i];         while (tmp--) {           pair<int, int> x = pq.top();           pq.pop();           mark[x.second] = 1;         }         while (pq.size()) pq.pop();       }     }     int flag = 0;     for (int i = 0; i < n; ++i) {       if (ar[i] != 0) {         if (mark[i]) {           switch (flag) {             case 0:               cout <<  pushStack n ;               break;             case 1:               cout <<  pushQueue n ;               break;             case 2:               cout <<  pushFront n ;               break;           }           flag = (flag + 1) % 3;         } else           cout <<  pushBack n ;       } else {         int k = sz[i];         cout << k;         while (k--) {           flag = (flag - 1 + 3) % 3;           switch (flag) {             case 0:               cout <<   popStack ;               break;             case 1:               cout <<   popQueue ;               break;             case 2:               cout <<   popFront ;               break;           }         }         cout <<   n ;       }     }     return 0;   }   