if __name__ == '__main__': s = list(input()) i, j = map(int, input().split()) s[i], s[j] = s[j], s[i] for x in range(len(s)): print(s[x], end="") if x == len(s)-1: print("")