A recipe requires 60% of its ingredients to be flour, 30% to be sugar, and the remaining 10% to be butter. If the total weight of the ingredients is 500 grams, how many grams of each ingredient are needed? Let's think step by step and output the final answer within \boxed{}.
user