s = list(input()) a, b =[int(i) for i in input().split()] tmp = s[a] s[a] = s[b] s[b] = tmp print(s[:])