S = list(input()) i,j = map(int,input().split()) i_str = S[i] S[i] = S[j] S[j] = i_str print("".join(S))