#include <bits/stdc++.h>
using namespace std;
int k, n, a[1000];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int res = 1;
  int summ = 0;
  bool t = false;
  bool f = false;
  for (int i = 0; i < n; i++) {
    if (a[i] > 0) {
      cout << a[i] << ' ';
      f = true;
    }
    if (a[i] < 0) summ++;
    if (a[i] == 0) t = true;
  }
  for (int i = 0; i < summ / 2 * 2; i++) cout << a[i] << ' ';
  if (!f && summ == 0) cout << 0;
  if (!f && summ == 1 && t) cout << 0;
  if (!f && summ == 1 && !t) cout << a[0];
}
