You are given an array of natural numbers. Your task is to sort this array in ascending order based on the sum of the digits of each number. If two numbers have the same digit sum, sort them in descending order by their value.
The first line contains the integer ( ≤ ≤ 10^6), representing the number of natural numbers. The following lines each contain one natural number, with each number not exceeding 10^9.
Print the sequence of numbers sorted according to the specified conditions.
Example 1