#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, A[100000], count0 = 0, max = 0;
  scanf("%i", &n);
  for (int i = 0; i < n; i++) {
    scanf("%i", A + i);
    if (A[i] < 0) A[i] = -A[i] - 1;
    if (!A[i]) count0++;
    if (A[i] > max) max = A[i];
  }
  if (count0 == n) {
    for (int i = 1; i < n; i++) printf("-1 ");
    return 0 * printf(n & 1 ? "0" : "-1");
  }
  for (int i = 0; i < n; i++) {
    if (A[i]) {
      if (A[i] == max) {
        if (n & 1)
          printf("%i ", max);
        else
          printf("%i ", -A[i] - 1);
        max = 0;
      } else
        printf("%i ", -A[i] - 1);
    } else
      printf("-1 ");
  }
}
