s = list(input()) i, j = map(int, input().split()) tmp = s[i] s[i] = s[j] s[j] = tmp print("".join(s))