s = input() a = int(input()) b = int(input()) s[a], s[b] = s[b], s[a] print(s)