s = input() a,b = map(int,input().split()) t = s[a] s[a] = s[b] s[b] = t print(s)