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