#include <bits/stdc++.h>
using namespace std;
template <class T>
void printQueue(T& q) {
  while (!q.empty()) {
    cout << q.top() << endl;
    q.pop();
  }
}
long long power(long long a, long long b) {
  long long r = 1;
  while (b != 0) {
    if (b % 2 != 0) {
      r = r * a;
    }
    a = a * a;
    b = b / 2;
  }
  return r;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    int n;
    cin >> n;
    int ast[n + 1];
    int neg = 0;
    for (int i = 1; i <= n; i++) {
      cin >> ast[i];
      if (abs(-ast[i] - 1) > (abs(ast[i]))) {
        ast[i] = -ast[i] - 1;
      }
      if (ast[i] < 0) {
        neg += 1;
      }
    }
    int maxm = INT_MIN, in_m, minm = INT_MAX, in_mi;
    for (int i = 1; i <= n; i++) {
      if (ast[i] > maxm) {
        maxm = ast[i];
        in_m = i;
      }
      if (ast[i] < minm) {
        minm = ast[i];
        in_mi = i;
      }
    }
    if (neg % 2 == 0) {
      for (int i = 1; i <= n; i++) {
        cout << ast[i] << " ";
      }
    } else {
      if (neg == n) {
        ast[in_mi] = -ast[in_mi] - 1;
      } else {
        ast[in_m] = -ast[in_m] - 1;
      }
      for (int i = 1; i <= n; i++) {
        cout << ast[i] << " ";
      }
    }
  }
}
