Easy game (1)

Consider the following game: Given an initially empty set and a sequence of words, insert each word ww in the set if ww was not yet in it, and delete ww from the set if ww was already in it. At the end, print the words that are in the set, and also the words that have been in the set but finally are not in it.

Input

Input is a sequence of words.

Output

Print the words that finally are in the set, one per line and in increasing order. Afterwards, print twenty hyphens in a line, followed by the words that have been in the set but finally are not in it, one per line and in decreasing order.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:18:49.708Z

© Jutge.org, 2006–2026.
https://jutge.org