def sub_reverse string return string string i-1 -1 string stri raw_inp

1
2
3
4
5
6
7
8
9
def sub_reverse(string, i, j):
return string[:i - 1] + string[i-1:j][::-1] + string[j:]
stri = raw_input()
i, j = map(int, list(raw_input().split(' ')))
print sub_reverse(stri, i, j)