S = input() i, j = map(int,input().split()) res = "" for k in range(len(S)): if k == i: res += S[j] elif k == j: res += S[i] else: res += S[k] print(res)