SP11521 DOMINST - Dominant Strings

Description

**Dominant Strings** Given two strings _s $ _{1} $_ and _s $ _{2} $_ , we say that _s $ _{1} $_ _dominates_ _s $ _{2} $_ if the (multi)set of characters in _s $ _{1} $_ is a proper superset of the (multi)set of characters in _s $ _{2} $_ . For instance, "acmicpc" dominates "camp", but it does not dominate "chimp" or "macpac". For a set _S_ of strings, we call the strings in _S_ which are not dominated by any string in _S_ the_dominant strings_ of _S_ (even if they do not dominate any strings in _S_). Now, your task is simply to find all the dominant strings of a set of strings.

Input Format

The input contains a single set of strings, with one string per line. Each string consists of at least one and at most ten lower-case alphabetic characters. There will be at most 15000 strings, and no two strings will be identical. Input is terminated by end-of-file. **Output** Output consists of all dominant strings in the input set, in alphabetical order, one word per line.

Output Format

N/A