#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
pair<int, int> findSmallestElement(int arr[], int n) {
  int temp = arr[0];
  int ind = 0;
  for (int i = 0; i < n; i++) {
    if (temp > arr[i]) {
      ind = i;
      temp = arr[i];
    }
  }
  return {ind, temp};
}
pair<int, int> findLargestElement(int arr[], int n) {
  int temp = arr[0];
  int ind = 0;
  for (int i = 0; i < n; i++) {
    if (temp < arr[i]) {
      ind = i;
      temp = arr[i];
    }
  }
  return {ind, temp};
}
void solve() {
  int n;
  cin >> n;
  int arr[n];
  int neg = 0;
  int zeros = 0;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    arr[i] > 0 ? arr[i] = -arr[i] - 1 : zeros += (arr[i] == 0);
  }
  if (zeros & 1) {
    for (int i = 0; i < n; ++i) {
      if (zeros == 1) break;
      !arr[i] ? arr[i] -= 1, zeros-- : arr[i];
    }
    for (int i = 0; i < n; ++i) {
      neg += (arr[i] < 0);
    }
  } else {
    for (int i = 0; i < n; ++i) {
      !arr[i] ? arr[i] -= 1 : arr[i];
      neg++;
    }
  }
  if (zeros == 1 && neg % 2 == 0) {
    if (findSmallestElement(arr, n).second == -1 ||
        findSmallestElement(arr, n).second == 0) {
      for (int i = 0; i < n; ++i) {
        cout << arr[i] << " ";
      }
    } else {
      int ind = findSmallestElement(arr, n).first;
      int iindd = findLargestElement(arr, n).first;
      arr[ind] = -arr[ind] - 1;
      arr[iindd] = -1;
      for (int i = 0; i < n; ++i) {
        cout << arr[i] << " ";
      }
    }
  } else if (zeros == 1 && neg % 2 == 1) {
    int iindd = findLargestElement(arr, n).first;
    arr[iindd] = -arr[iindd] - 1;
    for (int i = 0; i < n; ++i) {
      cout << arr[i] << " ";
    }
  } else if (neg % 2 == 0) {
    for (int i = 0; i < n; ++i) {
      cout << arr[i] << " ";
    }
  } else {
    int ind = findSmallestElement(arr, n).first;
    arr[ind] = -arr[ind] - 1;
    for (int i = 0; i < n; ++i) {
      cout << arr[i] << " ";
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs"
       << "\n";
}
