s = list(input()) a,b = map(int, input().split()) A,B = s[a],s[b] s[a],s[b] = B,A ans = "".join(s) print(ans)