s=list(input()) i,j=map(int,input().split()) a,b=s[i],s[j] s[i],s[j]=b,a print("".join(s))