A relay chain of n nodes is given head to tail as L0, L1, ..., L(n-1). Reorder it into the weave L0, L(n-1), L1, L(n-2), L2, L(n-3), ... — alternately taking the next unused node from the front and from the back until all nodes are placed. Print the resulting chain.
Input format
Line 1: an integer n, the number of nodes.
Line 2: n space-separated integers, the node values from head to tail (empty line when n is 0).
Output format
Line 1: the number of nodes, n.
Line 2: the weaved values, space-separated (empty line if none).
Constraints
- 0 <= n <= 100000
- -1000000000 <= each value <= 1000000000