s = list(input()) i, j = map(int, input().split()) x = s[i] y = s[j] s[j] = x s[i] = y print(''.join(s))