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