def change(moji, nums) -> str: return moji[:int(nums[0])] + moji[int(nums[1])] \ + moji[int(nums[0]) + 1:int(nums[1])] + moji[int(nums[0])] \ + moji[int(nums[1]) + 1:] inp_str = input() irekae = list(input().split()) print(change(inp_str, irekae))