def mainProc(s,x,y): slst = list(s) slst[x], slst[y] = slst[y], slst[x] print("".join(slst)) if __name__ == '__main__': s = input() x, y = map(int,input().split()) mainProc(s,x,y)