def solve(): s = input() li = [] for idx in range(len(s)): li.append(s[idx]) line = input().split(" ") i = int(line[0]) j = int(line[1]) buf = li[i] li[i] = li[j] li[j] = buf ans = "" for idx in range(len(li)): ans += li[idx] print(ans) solve()