s = input() ij = input() i, j = [int(x) for x in ij.split()] ss = s ss[i] = s[j] ss[j] = s[i] print(ss)