Set of sets

Write a program that, given a sequence of sets of integer numbers,
prints the sets in order and with no repetitions.

Input

Input is a sequence of non empty sets of integer numbers, a set per
line. The elements inside each set are different, and can be given in
any order.

Output

Print the sets of the input, one per line, in order and with no
repetitions. Print the sets sorted non-decreasingly by the number of
elements. If there is a tie, print before the lexicographically smallest
set. The elements of each set must be written in increasing order.

Hint

The standard comparation between two sets follows the lexicographical
order.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:17:52.161Z

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