#C677. Activity Deduplication

    ID: 50566 Type: Default 1000ms 256MiB

Activity Deduplication

Activity Deduplication

You are given a list of daily activities. Some activities might be repeated. Your task is to remove duplicate activities while preserving the order of their first occurrence.

In other words, if an activity appears multiple times, only the first occurrence should be kept.

The solution should read from standard input (stdin) and output the resulting list to standard output (stdout). The input will consist of an integer followed by that many activity strings, each on a new line. The output should print the deduplicated activities separated by a single space.

Note: Activity comparison is case-sensitive.

Example:

Input:
6
running
walking
cooking
running
reading
cooking

Output: running walking cooking reading

</p>

inputFormat

The first line of input contains a single integer n representing the number of activities. The following n lines each contain one activity string.

outputFormat

Output a single line containing the deduplicated list of activities separated by a single space, preserving the order of their first occurrence.

## sample
6
running
walking
cooking
running
reading
cooking
running walking cooking reading