#C8308. Unique Capitalized Sorted Tags

    ID: 52276 Type: Default 1000ms 256MiB

Unique Capitalized Sorted Tags

Unique Capitalized Sorted Tags

Given a string of comma-separated tags, your task is to remove any duplicate tags, capitalize each tag (i.e., convert the first character to uppercase and the rest to lowercase), and then sort them in lexicographical order.

More formally, if we denote the set of unique tags as \( S \) where \( S = \{ s_1, s_2, \dots, s_k \} \), then you must output a string of the form:

[ \texttt{result} = f(s_1, s_2, \dots, s_k) = s'_1, s'_2, \dots, s'_k, ]

where each tag \( s'_i \) is the capitalized version of the original tag and \( s'_1 < s'_2 < \dots < s'_k \) in alphabetical order.

For instance, given the input "python,development,python,coding,development", the output should be "Coding,Development,Python".

inputFormat

The input is read from standard input. It consists of a single line containing a comma-separated string of tags. There are no spaces surrounding the commas.

outputFormat

Print the processed comma-separated string to standard output, where all duplicates have been removed, each tag is capitalized, and the tags are sorted in lexicographical order.

## sample
python,development,python,coding,development
Coding,Development,Python