s = input() x, y = map(int,input().split()) t=s t[x]=s[y] t[y]=s[x] print(t)