#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, n;
  cin >> n;
  vector<pair<int, int> > arr(n);
  for (i = 0; i < n; i++) {
    cin >> arr[i].first;
    arr[i].second = i;
  }
  sort(arr.begin(), arr.end());
  if (n % 2 == 0) {
    for (i = 0; i < n; i++) {
      if (arr[i].first == 0)
        arr[i].first = -1;
      else if (arr[i].first > 0)
        arr[i].first = -arr[i].first - 1;
    }
  } else {
    if (arr[0].first == 0 && arr[n - 1].first == 0)
      ;
    else {
      if (-arr[0].first > arr[n - 1].first) {
        arr[0].first = -arr[0].first;
        arr[0].first--;
        for (i = 1; i < n; i++) {
          if (arr[i].first == 0) arr[i].first = -1;
          if (arr[i].first > 0) arr[i].first = -arr[i].first - 1;
        }
      } else {
        for (i = 0; i < n - 1; i++) {
          if (arr[i].first == 0) arr[i].first = -1;
          if (arr[i].first > 0) arr[i].first = -arr[i].first - 1;
        }
      }
    }
  }
  for (i = 0; i < n; i++) swap(arr[i].first, arr[i].second);
  sort(arr.begin(), arr.end());
  for (i = 0; i < n; i++) cout << arr[i].second << " ";
  return 0;
}
