#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
long long int n , k , l;
int g;
cin >> n;
for( k = 0 ; k < n ; k++ )
{
cin >> g;
int w[ g ];
for( l = 0 ; l < g ; l++ ) cin >> w[ l ];
sort( w , w + g );
if( g % 2 == 0 ) cout << w[ g / 2 - 1 ] << endl;
else cout << w[ g / 2 ] << endl;
}
return 0;
}