#include <bits/stdc++.h>
using namespace std;
const int nmax = 2e6 + 69;
const long long int M = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  bool flag[n];
  bool zero[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int minus = 0;
  int plus = 0;
  int lo = INT_MIN;
  int loi = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] < 0) minus++;
    if (a[i] == 0) zero[i] = 1;
    if (a[i] > 0) plus++;
    if (a[i] < 0) {
      if (a[i] > lo) {
        lo = a[i];
        loi = i;
      }
    }
  }
  if (n == 1)
    cout << a[0] << "\n";
  else if (plus == 0 and minus <= 1)
    cout << 0 << "\n";
  else {
    if (minus % 2) {
      for (int i = 0; i < n; i++) {
        if (a[i] == 0 or i == loi) continue;
        cout << a[i] << " ";
      }
    } else {
      for (int i = 0; i < n; i++) {
        if (a[i] == 0) continue;
        cout << a[i] << " ";
      }
    }
    cout << "\n";
  }
}
