l=list(map(lambda i:i,input())) a,b =[int(i)-1 for i in input().split(" ")] ma =l[a] l[a]=l[b] l[b]=ma print("".join(l))