Write first-last and so on elements

Given a sequence of integers x0,,xn1x_0,\ldots,x_{n-1}, write again these nn elements to the output in the following order: x0,xn1,x1,xn2,x2,xn3,x_0,x_{n-1},x_1,x_{n-2},x_2,x_{n-3},\ldots.

Exam score: 2.5 Automatic part: 100%

Input

The input has several cases, each one described in a diferent line. Each case starts with a natural number n1n\geq 1 followed by nn integers x0,,xn1x_0,\ldots,x_{n-1}.

Output

Write the corresponding answer for each case in a different line, separating the elements of each sequence with blank spaces.

Problem information

Author: Professorat de PRO1

Generation: 2026-01-25T22:44:55.824Z

© Jutge.org, 2006–2026.
https://jutge.org