S = input() i, j = map(int, input().split()) T = "" for n in range(len(S)): if n == i or n == j: T += S[i + j - n] else: T += S[n] print(T)