def rev st return st i-1 join reversed st i-1 st st raw_input decode u

1
2
3
4
5
6
7
def rev(st, i, j):
return st[:i-1] + ''.join(reversed(st[i-1:j])) + st[j:]
st = raw_input().decode('utf-8')
i, j = map(int, raw_input().split())
print rev(st, i, j)