you are given an array A of size N. You need to print the array in the decreasing order of number based on sum of digits of the numbers up to single digit. In case two numbers have same sum value, the larger one's value comes first.

I am able to put the first condition in lambda but not the second one
My code

```
test_cases=int(input())
n=int(input())
arr=list(map(int,input().split()))

print(sorted(arr,key=lambda x:(sum(list(map(int,list(str(n))))), ?)))

```

I am a beginner