S = list(input()) a, b = map(int, input().split()) S[a], S[b] = S[b], S[a] print(''.join(S))