Write SQL query to solve given problem: Jill ranked which medium-quality class product as the highest, and how long will it take the company to manufacture such a product?. Keep the solution inside sql tag ```sql [SQL-Query] ```
SELECT T1.DaysToManufacture FROM Product AS T1 INNER JOIN ProductReview AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Rating = 5 AND T1.Class = 'M' ORDER BY T2.Rating LIMIT 1