#include <bits/stdc++.h>
using namespace std;
int n, a[10005], sum1 = 0, sum2 = 0;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] < 0)
      sum2++;
    else {
      if (a[i] == 0)
        sum1++;
      else
        cout << a[i] << " ";
    }
  }
  sort(a + 1, a + n + 1);
  if (sum2 % 2 == 0) {
    for (int i = 1; i <= sum2; i++) {
      cout << a[i] << " ";
    }
  } else {
    for (int i = 1; i <= sum2 - 1; i++) {
      cout << a[i] << " ";
    }
  }
  if (n == 1 && a[1] <= 0) {
    cout << a[1];
    return 0;
  }
  if (sum1 == n) cout << 0;
  if (sum1 + sum2 == n && sum2 == 1) cout << 0;
  return 0;
}
