// Add or remove includes
#include <iostream>
#include <string>

using namespace std;

// Adapt the header of the function to your case
void reverseSubstring(string &s, int i, int j);

// Adapt the call to 'function_name' and the way it is called to your case.
int main()  {
    string s;
    int i, j;
    while (cin >> s >> i >> j) {
        reverseSubstring(s, i, j);
        cout << s << endl;
    }
}
