func_code_string: #include <bits/stdc++.h>   using namespace std;   string str[500005];   int main() {     int n;     cin >> n;     for (int i = 0; i < n; i++) cin >> str[i];     for (int i = n - 2; i >= 0; i--) {       if (str[i] > str[i + 1]) {         string temp;         for (int j = 0; j < str[i].length(); j++) {           if (str[i + 1].length() < j || str[i][j] > str[i + 1][j]) break;           temp += str[i][j];         }         str[i] = temp;       }     }     for (int i = 0; i < n; i++) cout << str[i] << endl;     return 0;   }   