S = list(input()) i,j = map(int, input().split()) S[i],S[j] = S[j],S[i] print(*S,sep='')