s = list(input())
a, b = map(int, input().split())
s[a], s[b] = s[b], s[a]
print(*s, sep="")