s = input() i,j = map(int,input().split()) if i>j: i,j = j, i print(s[:i] + s[j] + s[i+1:j] + s[i] + s[j+1:])