#include #include #include #include #include #include #include #include #include #include #define LL long long #define pb push_back #define mp make_pair using namespace std; #define INF 1e9 const int MAXN = 100000; typedef struct{ int ii; int dis; }NODE; NODE node[105]; int num[105]; bool cmp(NODE a, NODE b){ return a.dis > b.dis; } int main(){ #ifdef LOCAL freopen("1.in","r", stdin); freopen("1.out", "w", stdout); #endif int T; int n; int i; scanf("%d", &T); while(T--){ scanf("%d", &n); int a,b,c; for(i=0; i