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