s=input() i,j=map(int,input().split()) t=list(s) t[i]=s[j];t[j]=s[i] print(''.join(t))