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: men's long shorts
Product list:
A: Dickies Men's 15 Inch Inseam Work Short With Multi Use Pocket, Khaki, 34
B: MAGNIVIT Men's Training Shorts for Men Breathable Causal Long Shorts with Pockets Burgundy
Answer: B,A