#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int num, temp;
  vector<long long int> arr;
  cin >> num;
  long long int pos = 0, neg = 0, zero = 0;
  for (int i = 0; i < num; i++) {
    cin >> temp;
    arr.push_back(temp);
    if (temp > 0)
      pos++;
    else if (temp == 0)
      zero++;
    else
      neg++;
  }
  int i;
  sort(arr.begin(), arr.end());
  for (i = num - 1; i >= 0; i--) {
    if (arr[i] > 0)
      cout << arr[i] << " ";
    else if (arr[i] == 0)
      continue;
    else
      break;
  }
  if (neg == num) {
    long long int count = neg / 2;
    if (count >= 1) {
      int j = 0;
      while (count != 0) {
        count--;
        cout << arr[j++] << " " << arr[j++] << " ";
      }
      cout << "\n";
    } else {
      cout << arr[num - 1] << "\n";
    }
  } else if (zero == num) {
    cout << arr[0] << "\n";
  } else if (num == (zero + neg)) {
    long long int count = neg / 2;
    if (count >= 1) {
      int j = 0;
      while (count != 0) {
        count--;
        cout << arr[j++] << " " << arr[j++] << " ";
      }
      cout << "\n";
    } else {
      cout << "0 \n";
    }
  } else {
    long long int j = 0;
    long long int count = neg / 2;
    if (count >= 1) {
      while (count != 0) {
        cout << arr[j++] << " " << arr[j++] << " ";
        count--;
      }
    }
    cout << "\n";
  }
}
