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