#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long int i, x, n, pos = 0, neg = 0;
    cin >> n;
    long long int ar[n], br[n];
    bool f = true;
    for (i = 0; i < n; i++) cin >> ar[i];
    for (i = 1; i < n; i++) {
      if (ar[i] != ar[i - 1]) {
        f = false;
        break;
      }
    }
    if (!f) {
      for (i = 0; i < n; i++) {
        if (ar[i] < 0) ar[i] = -ar[i];
      }
      for (i = 1; i < n; i += 2) {
        ar[i] = -ar[i];
      }
    }
    for (i = 0; i < n; i++) cout << ar[i] << ' ';
    cout << endl;
  }
  return 0;
}
