#include <iostream>
#include <cstring>
using namespace std;
int main() {
char s[1001];
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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y3N0cmluZz4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJY2hhciBzWzEwMDFdOwoJY2luID4+IHM7CglpbnQgaSwgajsKCWNpbiA+PiBpID4+IGo7Cglmb3IgKGludCBiID0gaSAtIDEsIGMgPSBqIC0gMTsgYiA8IGM7IGIrKyxjLS0pIHsKCQlpbnQgayA9IHNbYl07CgkJc1tiXSA9IHNbY107CgkJc1tjXSA9IGs7Cgl9Cgljb3V0IDw8IHM7CgkKCXJldHVybiAwOwoJCn0=