ls=list(input()) fc,lc=map(int,input().split()) fmp=ls[fc] lmp=ls[lc] ls[lc]=fmp ls[fc]=lmp print("".join(ls))