#include <bits/stdc++.h>
using namespace std;
long long power(long long a, long long b);
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long t = 1, i;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    vector<long long> a(n);
    long long count = 0;
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
    }
    if (a[0] > 0) a[0] *= -1;
    for (long long i = 1; i <= n - 1; i++) {
      if (i % 2 == 1) {
        if (a[i] < 0) a[i] *= -1;
      } else {
        if (a[i] > 0) a[i] *= -1;
      }
    }
    for (auto x : a) cout << x << " ";
    cout << "\n";
  }
  return 0;
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b % 2)
      b--, res = res * a;
    else
      b = b / 2, a *= a;
  }
  return res;
}
