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