line = input() num = list(map(int,input().split())) a = line[num[0]-1] b = line[num[1]-1] print(line.replace(a,b))