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: infant hats boys 0-3 months
Product list:
A: Luvable Friends baby boys Newborn and Terry Socks, Aztec, 0-6 Months US
B: i play. by green sprouts unisex-baby Bucket Sun Protection Hat,Navy Pinstripe,0/6mo
Answer: B,A