word = list(input().rstrip()) a, b = map(int, input().rstrip().split()) sw = word[a] word[a] = word[b] word[b] = sw print("".join(word))