S = input() i, j = map(int,input().split()) rep = S.replace(S[i],S[j]) rep = rep.replace(S[j],S[i]) print(rep)