a=list(input()) x,y=map(int,input().split()) a[x],a[y] = a[y],a[x] print("".join(a))