s = list(input()) m, n = map(int,input().split()) s[m],s[n] = s[n],s[m] print("".join(s))