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