s = input() i,j = map(int,input().split()) l = s[i] r = s[j] res = "" st = list() for a in s: st.append(a) else: st[i] = r st[j] = l for b in st: res += b print(res)