let id x = x
let n = Scanf.scanf "%d\n" id
let hn = (n+1) / 2

let array = Array.init n (fun _ -> (Scanf.scanf "%d ") id)
  
let list = Array.to_list array

let rec makelistA c m l =
  if c = hn then l else
    makelistA (c+1) (m+2) (array.(m) :: l)

let rec makelistB c m l =
  if c = n - hn then List.rev l else
    makelistB (c+1) (m+2) (array.(m) :: l)


let anslist = (makelistA 0 ((n+1) mod 2) []) @ (makelistB 0 (n mod 2) [])
    
let ans = Array.of_list anslist

let () =
  let rec output s =
    if s = n then print_string "\n"
    else
      (Printf.printf "%d " ans.(s); output (s+1)) in output 0