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