your younger brother is approaching. You asked him what he wants as a gift. He was so delighted that he began to list everything in a row, repeating some names several times from excitement: “I want another machine and a doll and a robot and a robot and a robot again!”.
rn
your task as an older and more technically unanimous relative & mdash; Help parents make a clear list of purchases. It is necessary to write a program that will process the enthusiastic speech of the child and remove all the repetitions from it, leaving only unique gift names. The order in the final list should be the same as in the child’s speech at the first mention of the gift. rn technical specifications:
Write a program that accepts one line of text, consisting of words separated by spaces. The program should derive a new line, which contains only unique words from the original line, preserved in the order of their first appearance. To decide, use only input/output, cycle & nbsp; for & nbsp; and conditional operator & nbsp; if
Input format
One line (string), consisting of words separated by spaces. Words are the names of gifts.
Output format
One line (string), which contains only unique words from the input line separated by a gap. The word order must correspond to their first appearance in the entrance line.
Example
Input
machine doll machine robot robot doll
Hint
There will be no clue here, decide for yourself!