w = input() n1, n2 = [int(_) for _ in input().split()] w1 = w[n1] w2 = w[n2] w = list(w) w[n1] = w2 w[n2] = w1 print(''.join(w))