import java.util.Scanner object Main extends App { val sc = new Scanner(System.in) var s = sc.next() val i, j = sc.nextInt val temp = s(i) s = s.updated(i, s(j)) s = s.updated(j, temp) println(s) }