Instruction: Given a query and a list of products denoted as A, B, C, ... with their titles, rank the products according to their relevance to the query. Output only a ranked list in which the most relevant product is at the top of the list.

Input:
Query: pirate crew hat
Product list:
A: Dorfman Pacific Co. Men's Yacht Cap, Navy, One Size
B: Top of the World East Carolina Pirates Men's Relaxed Fit Adjustable Hat Team Color Primary Icon, Adjustable
C: GE Animation GE-6468 One Piece Luffy's Straw Hat Pirate Flag Multi-colored, 31"
Answer: B,A,C