#include <bits/stdc++.h>
using namespace std;
int n;
const int sz = 1e5 + 9;
int a[sz];
vector<pair<int, int>> v;
bool can;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] >= 0) a[i] = -a[i] - 1;
    v.push_back(make_pair(a[i], i));
  }
  sort(v.begin(), v.end());
  if (n & 1) {
    for (auto u : v) {
      if (a[u.second] == -1) continue;
      can = 1;
      a[u.second] = -a[u.second] - 1;
      break;
    }
    if (!can) a[v[0].second] = 0;
  }
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
  return 0;
}
