s=list(input()) n,m=map(int,input().split()) s[n],s[m]=s[m],s[n] print("".join(s))