open Batteries
let () =
  let h,w = Scanf.scanf "%d %d " (fun a b -> a,b) in
  let mat = Array.to_list @@ Array.init h (fun _ -> Scanf.scanf "%s " (fun a -> a )) in
  let tmp = List.fold_right (fun x y ->  x :: x :: y) mat [] in
  List.iter (Printf.printf "%s\n") tmp 
