#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>
#include <string>
#include <limits>
#include <iterator>

int main()
{
    unsigned int numberOfExamples;
    if (!(std::cin >> numberOfExamples) || numberOfExamples == 0)
        return EXIT_FAILURE;
    
    while (numberOfExamples-- > 0)
    {
        unsigned int n_tests = 0;
        if (std::cin >> n_tests)
        {
            if (n_tests == 0)
                continue;

            // consume remainder of test lines
            std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');

            // read set of values
            std::string line;
            if (std::getline(std::cin, line))
            {
                std::istringstream iss(line);
                std::vector<int> v {
                    std::istream_iterator<int>(iss),
                    std::istream_iterator<int>() };
                
                if (v.size() > 0)
                {
                    std::sort(v.begin(), v.end());
                    
                    if (v.size() % 2 == 0)
                        std::cout << v[v.size()/2-1] << '\n';

                    else
                        std::cout << v[v.size()/2] << '\n';
                }
            }
        }
        else
        {
            std::cerr << "Failed to read number of test values\n";
        }
    }
}
