#include <bits/stdc++.h>
using namespace std;
struct Node {
  int data;
  Node* next;
};
Node* head = NULL;
void insert_ll(int data) {
  Node* temp = new (Node);
  temp->data = data;
  temp->next = NULL;
  if (head == NULL) {
    head = temp;
    return;
  } else {
    Node* temp2 = head;
    while (temp2->next != NULL) {
      temp2 = temp2->next;
    }
    temp2->next = temp;
    return;
  }
}
void print_ll() {
  Node* temp = head;
  while (temp != NULL) {
    cout << temp->data << " ";
    temp = temp->next;
  }
  cout << endl;
}
void del_node(int n) {
  Node* temp = head;
  if (n == 0) {
    head = head->next;
    free(temp);
  } else {
    n--;
    while (n) {
      temp = temp->next;
      n--;
    }
    Node* temp2 = temp->next;
    temp->next = temp2->next;
    free(temp2);
  }
}
void rmv_dups() {
  map<int, int> mp;
  Node* temp = head;
  int a = 0;
  while (temp != NULL) {
    if (mp[temp->data]) {
      temp = temp->next;
      del_node(a);
      continue;
    }
    mp[temp->data] = 1;
    a++;
    temp = temp->next;
  }
}
void reverse_ll() {
  Node* curr = head;
  Node *prev = NULL, *next = NULL;
  while (curr != NULL) {
    next = curr->next;
    curr->next = prev;
    prev = curr;
    curr = next;
  }
  head = prev;
}
vector<vector<int>> paths;
vector<int> path;
void dfs(int root, vector<int> gph[], int n) {
  path.push_back(root);
  if (root == n - 1) {
    paths.push_back(path);
  } else
    for (auto x : gph[root]) {
      dfs(x, gph, n);
    }
  path.pop_back();
}
struct TreeNode {
  int val;
  TreeNode* left;
  TreeNode* right;
};
TreeNode* root = NULL;
TreeNode* insert_bst(int data, TreeNode* root) {
  if (root == NULL) {
    TreeNode* temp = new TreeNode;
    temp->val = data;
    temp->left = temp->right = NULL;
    root = temp;
    return root;
  } else {
    if (data <= root->val)
      root->left = insert_bst(data, root->left);
    else
      root->right = insert_bst(data, root->right);
  }
}
void search_bst(int data, TreeNode* root) {
  if (root == NULL) {
    cout << "False" << endl;
    return;
  }
  if (root->val == data) {
    cout << "True" << endl;
    return;
  } else if (data <= root->val)
    search_bst(data, root->left);
  else
    search_bst(data, root->right);
}
void print_permutations(vector<int>& arr, int n, int l, set<vector<int>> st) {
  if (l >= n) {
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
    cout << endl;
  }
  for (int i = l; i < n; i++) {
    swap(arr[i], arr[l]);
    print_permutations(arr, n, l + 1, st);
    swap(arr[i], arr[l]);
  }
}
int main() {
  ios::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    int arr[n];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    for (int i = 0; i < n; i++) {
      if (i % 2 == 0 && arr[i] > 0)
        arr[i] = -arr[i];
      else if (i % 2 && arr[i] < 0)
        arr[i] = -arr[i];
    }
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
    cout << endl;
  }
}
