s = list(input()) i, j = [int(x) for x in input().split()] s[i], s[j] = s[j], s[i] print("".join(s))