#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    long long arr[n + 10];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    long long d = (n - 1) / 2;
    long long d1 = d;
    long long count = 0;
    for (int i = 0; i < n; i++) {
      if (count % 2 == 0) {
        arr[i] = abs(arr[i]) * -1;
        count++;
      } else {
        arr[i] = abs(arr[i]);
        count++;
      }
    }
    for (int i = 0; i < n; i++) {
      cout << arr[i] << " ";
    }
    cout << endl;
  }
}
