a = gets.to_s.chomp.chars.map.with_index{ |c, i| [i.to_s, c] }.to_h
s = gets.to_s.chomp

puts s.gsub(/\d/, a)