Instruction: Analyze the query and each product title. Sort the products in descending order based on their relevance to the query. The most relevant product should be at the top of the list, and output the ranked list.

Input:
Query: spray foam
Product list:
A: Great Stuff 99108824 Smart Dispenser Gaps & Cracks, Cream
B: GREAT STUFF PRO Gaps and Cracks - 24oz Fireblock Foam Insulation Sealant, Pack of 12. Closed Cell, Polyurethane Expanding Spray Foam. Seals & Insulates Gaps Up to 3". Applicator Gun, Cleaner Included
Answer: A,B