Scanf.scanf "%d" (fun n ->
    let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in
    for i = 0 to n - 1 do
        let f = i < (n + 1) / 2 in
        let idx = if f then n - 1 - i * 2 else (i - (n + 1) / 2) * 2 + (n mod 2) in
        Printf.printf "%d " a.(idx)
    done;
    print_newline ()
)