#include <bits/stdc++.h>
#pragma GCC optimize("O3")
long long n, m, a, b, c, d, x, z, k, y;
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> k;
  while (k--) {
    cin >> n;
    long long arr[n];
    for (int i = 0; i < n; i++) cin >> arr[i], arr[i] = abs(arr[i]);
    cout << arr[0] << " ";
    for (int i = 1; i < n; i += 2) {
      cout << arr[i] * -1 << " " << arr[i + 1] << " ";
    }
    cout << endl;
  }
  return 0;
}
