#include "bits/stdc++.h" using namespace std; #define INIT ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define _CRT_SECURE_NO_WARINGS #define ALL(obj) (obj).begin(),(obj).end() #define SORT(obj) sort(ALL(obj)) #define rep(i,n) for(int i = 0; i < (n); ++i) #define coutALL(x) for(auto i=x.begin();i!=--x.end();i++)cout<<*i<<" ";cout<<*--x.end()<; using VI = vector; using VP = vector

; templatebool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; } templatebool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; } #pragma region vector入出力用 template istream& operator >> (istream& is, vector& vec) { for (T& x : vec) is >> x; //for(int i=0; i> x[i]; とかでもいいです。 return is; } template ostream& operator << (ostream& os, vector& vec) { for (int i = 0; i < vec.size(); i++) { os << vec[i] << (i + 1 == vec.size() ? "" : " "); } return os; } #pragma endregion #pragma region Functions #pragma endregion signed main() { INIT; // 必須 int n; cin >> n; rep(i, n) { int k; cin >> k; vector L(k); cin >> L; sort(L.rbegin(), L.rend()); cout << L << "\n"; } }