#include <bits/stdc++.h>
using namespace std;
long long arr[100005];
int main() {
  long long n, i = 0, ps = 0, ng = 0, z = 0, mn = 1000005, mx = -1, pr = 1;
  cin >> n;
  for (long long x = 0; x < n; x++) {
    cin >> arr[x];
    if (arr[x] >= 0) arr[x] = -arr[x] - 1;
    pr *= arr[x];
    if (abs(arr[x]) > mx) {
      mx = abs(arr[x]);
      i = x;
    }
  }
  if (pr > 0 || n % 2 == 0) {
    for (long long x = 0; x < n; x++) cout << arr[x] << " ";
  } else {
    arr[i] = -arr[i] - 1;
    for (long long x = 0; x < n; x++) cout << arr[x] << " ";
  }
  return 0;
}
