Sort the hashes#11298

Sort the hashes

1 second
128 megabytes
Easy

A set of words is given. Sort the words in increasing order of their hashes.

The hash of a string is defined as the sum of the ASCII codes of its characters. For example, hash("Cat") = 67 + 97 + 116 = 280, hash("dOG") = 100 + 79 + 71 = 250.

We say that a string is less than a string if hash() hash(). For example, "dOG" "Cat" because hash("dOG") , hash("Cat") , and 250 < 280.

However, the text contains a special word "ADAUniversity", which must always appear at the beginning of the sorted list. We assume that hash("ADAUniversity") .

For words with the same hash value, their relative order must be preserved (you must implement a stable sort).

Input

The text contains a set of words. Each word consists of letters of the Latin alphabet (uppercase or lowercase). Only spaces may appear between words. The number of words does not exceed . The length of each word does not exceed characters.

Output

Print all words sorted according to the given rules. Each word must be printed on a separate line.

Examples

Example 1

Loading
Loading