S = list(input()) a, b = map(int, input().split()) st = S[a] st1 = S[b] S[a] = st1 S[b] = st ans ="" for l_i in S: ans += l_i print(ans)