a b a c b
a b c
words = input().split() result = [] for word in words: if word not in result: result.append(word) print(' '.join(result))