s = input() i, j = map(int, input().split()) ans = "" for k, e in enumerate(s): if k == i: ans += s[j] elif k == j: ans += s[i] else: ans += e print(ans)