s = list(input()) a,b = map(int,input().split()) t = s[a] s[a] = s[b] s[b] = t u = "" for i in s: u += i print(u)