s=list(input()) i,j=list(map(int,input().split())) temp=s[i] s[i]=s[j] s[j]=temp print("".join(s))