#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int i, j;
cin >> i >> j;
for (int b = i - 1, c = j - 1; b < c; b++,c--) {
int k = s[b];
s[b] = s[c];
s[c] = k;
}
cout << s;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglzdHJpbmcgczsKCWNpbiA+PiBzOwoJaW50IGksIGo7CgljaW4gPj4gaSA+PiBqOwoJZm9yIChpbnQgYiA9IGkgLSAxLCBjID0gaiAtIDE7IGIgPCBjOyBiKyssYy0tKSB7CgkJaW50IGsgPSBzW2JdOwoJCXNbYl0gPSBzW2NdOwoJCXNbY10gPSBrOwoKCX0KCWNvdXQgPDwgczsKCQoJcmV0dXJuIDA7Cn0=