S=[i for i in input().rstrip()] i,j=map(int, input().split()) S[i],S[j]=S[j],S[i] S="".join(S) print(S)