#include <bits/stdc++.h>
using namespace std;
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << '\n';
}
const long long sze = 3e5 + 50, oo = 1e18 + 500, mod = 1e9 + 7;
const long double eps = 1e-9, PI = 2 * acos(0.0);
const long long N = 1e6 + 10;
vector<long long> vertices[sze];
vector<long long> visit(sze, 0);
vector<char> used(sze, false);
vector<long long> arr(sze, 0);
long long n, m, k;
long long cnt = 0;
signed main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  vector<long long> a(n);
  long long mx = -oo;
  long long ind = -1;
  for (long long i = 0; i < n; i++) {
    cin >> m;
    if (m >= 0) {
      m = -m - 1;
    }
    if (-m != 1) {
      if (-m > mx) {
        mx = -m;
        ind = i;
      }
    }
    a[i] = m;
  }
  if (ind == -1) ind = 0;
  if (n & 1) {
    a[ind] = -a[ind] - 1;
  }
  show(a);
  return 0;
}
