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