s=input() i,j=map(int,input().split());i,j=min(i,j),max(i,j) print(s[:i]+s[j]+s[i+1:j]+s[i]+s[j+1:len(s)])