func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long MOD = (long long)1e9 + 7;   const int SIZE = 2e5 + 5;   const long long INF = 1LL << 60;   const double eps = 1e-4;   const double PI = 3.1415926535897932;   int last[26];   int main() {     string s;     cin >> s;     int n = ((int)(s).size());     for (int i = 0; i < (26); ++i) last[i] = -1;     for (int i = 0; i < (n); ++i) last[s[i] -  a ] = i;     int cl = 0;     stack<int> st;     string ans =   ;     for (int i = 0; i < (n); ++i) {       while (cl < 26 && last[cl] < i) {         while (((int)(st).size()) && (st.top() <= cl)) {           ans +=  a  + st.top();           st.pop();         }         cl++;       }       if (cl >= 26) break;       while (((int)(st).size()) && (st.top() <= cl)) {         ans +=  a  + st.top();         st.pop();       }       if (last[cl] > i) {         if (s[i] ==  a  + cl) {           ans += s[i];         } else {           st.push(s[i] -  a );         }       } else if (last[cl] == i) {         ans += s[i];         cl++;       }     }     while (((int)(st).size())) {       int i = st.top();       st.pop();       ans +=  a  + i;     }     cout << ans;   }   