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