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