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: blackbeard costume
Product list:
A: elope Disney Blackbeard Hat, Black, One Size
B: California Costumes Boys Deluxe Pirate Captain Child Costume Multicolor, Medium
C: Rubie's Characters Caveman Beard And Set Wig, Black, One Size
D: amscan 840920 Long Black Plush Beard and Moustache, 1 Piece, 10.5" x 7.2"
Answer: B,D,A,C