#pragma GCC optimize("O3", "inline")
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
#define pb push_back
#define ub upper_bound
#define INF 1e18 + 100
ll solve()
{
int n;
cin >> n;
vector<ll> a(n);
for(int i = 0; i < n; i++) cin >> a[i];
ll ans = 0;
sort(a.begin(), a.end());
int cnt = 0;
for(int i = n - 1; i >= 0; i--){
if(a[i] <= 0){
if(cnt >= 2) return ans;
if(cnt == 0) return a[n - 2] - a[n - 1];
return ans + ((n - i - 1) % 2 == 0 ? a[i] : -a[i]);
}
cnt++;
ans += ((n - i - 1) % 2 == 0 ? a[i] : -a[i]);
}
return ans;
}
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t = 1;
cin >> t;
while(t--)
{
ll x = solve();
cout << x << "\n";
}
return 0;
}