#include <iostream> #include <algorithm> using namespace std; int main(int argc, const char * argv[]) { unsigned long long a,b=1,c=2,d=0,e=0,f[65535]; int r; cin>>a; for(b=0;b<a;b++) { cin>>r; int w[r]; for(c=0;c<r;c++) { cin>>w[c]; } sort(w,w+r); if(r%2==0) { cout<<w[r/2-1]<<endl; } else { cout<<w[r/2]<<endl; } } }