#K37892. Remove Duplicate Log Entries

    ID: 26077 Type: Default 1000ms 256MiB

Remove Duplicate Log Entries

Remove Duplicate Log Entries

You are given a single line containing space-separated log entries. Your task is to remove any duplicate entries, preserving the order of their first occurrence.

Formally, if the input tokens are given by \( [l_1, l_2, \dots, l_n] \), then you should output \( [l_{i_1}, l_{i_2}, \dots, l_{i_k}] \) where each \( l_{i_j} \) appears for the first time in the input and \( i_1 < i_2 < \dots < i_k \). The operation can be conceptually defined as \[ output = \text{join}(\{l \mid l \text{ appears for the first time in } input\}) \]

inputFormat

The input consists of a single line with space-separated log entries. The line might be empty.

outputFormat

Output a single line containing the unique log entries in the order of their first occurrence, separated by a single space. If the input is empty, print an empty line.

## sample
1.1.1.1 1.1.1.2 1.1.1.3
1.1.1.1 1.1.1.2 1.1.1.3