ll@t; rep(t){ ll@n,@a[n],@b[n],c[n]; sortA_index(n,a,c); ll e=sum(a(n)),f=0,g=e; rep(i,n){ g+=b[i]-a[i]; if(g>e){ f=i+1; e=g; } } rep(i,n){ wtN(c[i]