s, t, u = gets.chomp.split puts (0...s.length).to_a.reject! { |i| [t, u].map!(&:to_i).include?(i) }.map{ |i| s[i] }.*''