#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
const long long mod = 1000000007;
long long power(long long x, long long y) {
  long long res = 1;
  x = x % mod;
  while (y > 0) {
    if (y & 1) res = (res * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long max(long long a, long long b) {
  long long ans = a > b ? a : b;
  return ans;
}
long long min(long long a, long long b) {
  long long ans = a < b ? a : b;
  return ans;
}
signed main() {
  {
    long long n;
    cin >> n;
    long long a[n], b[n];
    for (long long i = 0; i < n; i++) {
      cin >> a[i];
      b[i] = a[i];
    }
    long long cn = 0, c1 = 0;
    for (long long i = 0; i < n; i++) {
      if (a[i] >= 0 && a[i] != -1) a[i] = -a[i] - 1;
      if (a[i] < 0 && a[i] != -1) cn++;
      if (a[i] == -1) c1++;
    }
    if ((c1 + cn) % 2 == 0) {
      for (long long i = 0; i < n; i++) cout << a[i] << " ";
      return 0;
    }
    if (c1 % 2 && cn == 0) {
      for (long long i = 0; i < n; i++) {
        if (b[i] == -1) b[i] = 0;
        break;
      }
      for (long long i = 0; i < n; i++) cout << b[i] << " ";
      return 0;
    }
    long long ind = -1, m = 10000000;
    for (long long i = 0; i < n; i++) {
      if (a[i] < m && a[i] != -1) {
        m = a[i];
        ind = i;
      }
    }
    a[ind] = -a[ind] - 1;
    for (long long i = 0; i < n; i++) cout << a[i] << " ";
  }
  return 0;
}
