let n = Scanf.scanf " %d" (+) 0
let a_s = Array.init n @@ fun _ -> Scanf.scanf " %d" (+) 0
let fs, bs = Array.fold_left (fun (xs, ys) a -> a :: ys, xs) ([], []) a_s
let _ = List.(fs @ rev bs |> iteri (fun i n -> Printf.printf (if i = 0 then "%d" else " %d") n)); print_newline ()