l = list(input()) a,b = map(int, input().split()) l[a],l[b] = l[b],l[a] print("".join(l))