#C12408. Remove Duplicates from List
Remove Duplicates from List
Remove Duplicates from List
You are given a list of integers. Your task is to remove all duplicate elements while preserving the order in which they appear in the input.
For example, if the input is 1 2 2 3 4 4 5
, the output should be 1 2 3 4 5
.
The problem requires you to read the input from stdin and write the result to stdout. The solution must handle various cases including lists with all unique elements, all duplicates, and a mix of negative and positive numbers.
inputFormat
The input is provided via stdin as a single line of space-separated integers.
outputFormat
Output the list of integers with duplicates removed in the same order as they appear in the input. The numbers should be printed on a single line and separated by a single space.
## sample1 2 2 3 4 4 5
1 2 3 4 5