func_code_string: #include <bits/stdc++.h>   using namespace std;   int dirx[] = {-1, -1, -1, 0, 0, 1, 1, 1};   int diry[] = {-1, 0, 1, -1, 1, -1, 0, 1};   int dx[] = {-1, 1, 0, 0};   int dy[] = {0, 0, -1, 1};   class SorT {    public:     bool operator()(pair<int, int>& p1, pair<int, int>& p2) {       return p1.second < p2.second;     }   };   int ans[1000010];   int main() {     string s;     cin >> s;     int left = 0, right = s.size() - 1;     for (int i = 0; i < s.size(); i++) {       if (s[i] ==  l )         ans[right--] = i + 1;       else         ans[left++] = i + 1;     }     for (int i = 0; i < s.size(); i++) {       printf( %d n , ans[i]);     }   }   