Vasya has gotten interested in programming contests in TCMCF+++ rules. On the contest n problems were suggested and every problem had a cost — a certain integral number of points (perhaps, negative or even equal to zero). According to TCMCF+++ rules, only accepted problems can earn points and the overall number of points of a contestant was equal to the product of the costs of all the problems he/she had completed. If a person didn't solve anything, then he/she didn't even appear in final standings and wasn't considered as participant. Vasya understood that to get the maximal number of points it is not always useful to solve all the problems. Unfortunately, he understood it only after the contest was finished. Now he asks you to help him: find out what problems he had to solve to earn the maximal number of points.

Input

The first line contains an integer n (1 ≤ n ≤ 100) — the number of the suggested problems. The next line contains n space-separated integers ci ( - 100 ≤ ci ≤ 100) — the cost of the i-th task. The tasks' costs may coinсide.

Output

Print space-separated the costs of the problems that needed to be solved to get the maximal possible number of points. Do not forget, please, that it was necessary to solve at least one problem. If there are several solutions to that problem, print any of them.

Examples

Input

5
1 2 -3 3 3


Output

3 1 2 3 


Input

13
100 100 100 100 100 100 100 100 100 100 100 100 100


Output

100 100 100 100 100 100 100 100 100 100 100 100 100 


Input

4
-2 -2 -2 -2


Output

-2 -2 -2 -2 
import java.io.*;
import java.util.*;

public class Problem {

    private static final InputStream inputStream = System.in;
    private static final FastScanner in = new FastScanner(inputStream);
    private static final PrintWriter stdOut = new PrintWriter(System.out);

    public static void main(final String[] args) {
        new Solver().solve();
        stdOut.close();
        in.close();
    }

    static class Solver {

        public void solve() {
            int n = scanInt();
            List<Integer> negative = new ArrayList<>();
            List<Integer> result = new ArrayList<>();
            int[] all = new int[n];
            int countZero = 0;
            for (int i = 0; i < n; i++) {
                int price = scanInt();
                all[i] = price;
                if (price > 0) {
                    result.add(price);
                    continue;
                }
                if (price == 0) {
                    ++countZero;
                }
                if (price < 0) {
                    negative.add(price);
                }
            }
            /*if (countZero == n) {
                stdOut.println(0);
                return;
            }
            if (n == 1 && negative.size() == 1) {
                stdOut.println(negative.get(0));
                return;
            }*/
            if (negative.size() % 2 == 0) {
                result.addAll(negative);
            } else {
                int ind = closerToZero(negative);
                for (int i = 0; i < negative.size(); i++) {
                    if (i != ind) {
                        result.add(negative.get(i));
                    }
                }
            }
            if (result.size() == 0) {
                int max = Integer.MIN_VALUE;
                for (int el : all) {
                    max = Math.max(el, max);
                }
                stdOut.println(max);
                return;
            }
            for (int el : result) {
                stdOut.print(el + " ");
            }
        }

        public int closerToZero(List<Integer> negative) {
            int min = Integer.MAX_VALUE;
            int indexOfMin = -1;
            for (int i = 0; i < negative.size(); i++) {
                if (Math.abs(negative.get(i)) < min) {
                    min = Math.abs(negative.get(i));
                    indexOfMin = i;
                }
            }
            return indexOfMin;
        }
    }

    static class FastScanner {
        private final BufferedReader reader;
        private StringTokenizer st;

        public FastScanner(InputStream inputStream) {
            reader = new BufferedReader(new InputStreamReader(inputStream));
        }

        public void close() {
            try {
                reader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        private void read() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

        public String next() {
            read();
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }

    private static int scanInt() {
        return Integer.parseInt(in.next());
    }

    private static long scanLong() {
        return Long.parseLong(in.next());
    }

    private static String next() {
        return in.next();
    }

    private static int nextInt() {
        return in.nextInt();
    }

    private static int[] nextArrayInt(int len) {
        int[] array = new int[len];
        for (int i = 0; i < len; i++) {
            array[i] = scanInt();
        }
        return array;
    }

    private static long[] nextLongArray(int len) {
        long[] array = new long[len];
        for (int i = 0; i < len; i++) {
            array[i] = scanLong();
        }
        return array;
    }
}