s=input() a,b=map(int,input().split()) ans="" for i in range(len(s)): if i==a: ans+=s[b] elif i==b: ans+=s[a] else: ans+=s[i] print(ans)