S = list(input()) I, J = map(int, input().split()) S[I], S[J] = S[J], S[I] print(*S, sep="")