s = input() s_list = [s[i] for i in range(len(s))] i,j = map(int,input().split()) temp = s_list[i] s_list[i] = s_list[j] s_list[j] = temp for i in s_list: print(i,end="")