S = gets.chomp i,j = gets.split.map(&:to_i) ci = S[i] S[i] = S[j] S[j] = ci puts S