from functools import reduce s=input() i,j=map(int,input().split()) t=[c for c in s] d=t[j] t[j]=t[i] t[i]=d print(reduce(lambda x, y: x + y, [str(x) for x in t]))