N = list(input()) a, b = map(int, input().split()) tmp = N[a] N[a] = N[b] N[b] = tmp for i in range(len(N)): print("{0}".format(N[i]), end="")