#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n;
  cin >> n;
  vector<pair<long long int, long long int> > v;
  long long int cnt = 0;
  for (long long int i = 0; i < n; i++) {
    long long int x;
    cin >> x;
    if (x >= 0) x = -1 * x - 1;
    if (x < 0) cnt++;
    v.push_back(make_pair(x, i));
  }
  if (cnt & 1) {
    sort(v.begin(), v.end());
    long long int f = 0;
    for (long long int i = 0; i < n; i++) {
      if (v[i].first != -1) {
        v[i].first = -1 * v[i].first - 1;
        f = 1;
        break;
      }
    }
    if (f == 0) {
      v[0].first = -1 * v[0].first - 1;
    }
    vector<long long int> ans(n);
    for (long long int i = 0; i < n; i++) {
      ans[v[i].second] = v[i].first;
    }
    for (long long int x : ans) cout << x << " ";
  } else {
    for (long long int i = 0; i < n; i++) cout << v[i].first << " ";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int T;
  T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
