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