Given a list of words, remove duplicates while preserving the order of first appearances. Input: A line of words separated by spaces. Output: Words with duplicates removed, in their original order. Example: - Input: "apple banana apple cherry banana" - Output: "apple banana cherry" Converting to a set removes duplicates but loses order.
Think about how to combine a set with a list.