#C13261. Remove Duplicates
Remove Duplicates
Remove Duplicates
Your task is to implement a program that removes duplicate integers from a given list while preserving the order of their first occurrence. The program should read input from standard input (stdin) and output the resulting list to standard output (stdout). The input will consist of a sequence of space-separated integers. The output should print the unique integers in the same order they first appeared in the input, separated by a space.
Formally, given an array \(A = [a_1, a_2, \dots, a_n]\), you need to output \(B = [b_1, b_2, \dots, b_k]\) such that each \(b_i\) is the first occurrence of a number in \(A\) and for any \(j < i\), \(b_j \neq b_i\). Use the following function signature conceptually:
(\texttt{remove_duplicates(lst)})
For example, given the input:
4 5 4 4 5 3
the output should be:
4 5 3
inputFormat
The input consists of a single line containing space-separated integers. The number of integers is not fixed. Read the input from standard input (stdin).
outputFormat
Print the resulting list to standard output (stdout) as space-separated integers after removing duplicates, preserving their first occurrence order.
## sample4 5 4 4 5 3
4 5 3