#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;
}