A company is planning a team-building event and wants to allocate the costs based on the percentages of participation. The total cost for the event is $1200. If 40% of the participants are from the Sales department, 30% are from the Marketing department, and the remaining 30% are from the Engineering department, how much will each department need to contribute to cover the total cost? Let's think step by step and output the final answer within \boxed{}.
user