memo = "yukicoder" memo_list = memo.split("") stain_memo = gets.chomp.split("") result = String.new (stain_memo.size).times do |i| result = memo_list[i] if stain_memo[i] == "?" end puts result