import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = list(readline().rstrip().decode('utf-8')) a,b = map(int,read().split()) S[a],S[b] = S[b],S[a] answer = ''.join(S) print(answer)