#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int t = 1;
cin >> t;
while(t--){
int n;
cin >> n;
int a[n];
for(int &i:a) cin >> i;
sort(a, a + n);
int ans = 0, i = 0, j = n - 1;
while(i <= j){
ans = max(ans, a[j] + a[i]);
i++;
j--;
}
cout << ans << '\n';
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBpbnQgbG9uZyBsb25nCgpzaWduZWQgbWFpbigpewogICAgaW9zX2Jhc2U6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CiAgICBjaW4udGllKE5VTEwpOwogICAgY291dC50aWUoTlVMTCk7CiAgICBpbnQgdCA9IDE7CiAgIGNpbiA+PiB0OwogICAgd2hpbGUodC0tKXsKICAgICAgICBpbnQgbjsKICAgICAgICBjaW4gPj4gbjsKICAgICAgICBpbnQgYVtuXTsKICAgICAgICBmb3IoaW50ICZpOmEpIGNpbiA+PiBpOwogICAgICAgIHNvcnQoYSwgYSArIG4pOwogICAgICAgIGludCBhbnMgPSAwLCBpID0gMCwgaiA9IG4gLSAxOwogICAgICAgIHdoaWxlKGkgPD0gail7CiAgICAgICAgICAgIGFucyA9IG1heChhbnMsIGFbal0gKyBhW2ldKTsKICAgICAgICAgICAgaSsrOwogICAgICAgICAgICBqLS07CiAgICAgICAgfQogICAgICAgIGNvdXQgPDwgYW5zIDw8ICdcbic7CiAgICB9CiAgICByZXR1cm4gMDsKfQ==