let max l =
  let rec loop l res els =
    match l with
    | []      -> (res, els)
    | x :: xs -> if x > res then loop xs x (res :: els)
    else loop xs res (x :: els)
  in match l with
  | []      -> (0, [])
  | x :: xs -> loop xs x []
  ;;

let sort l =
  let rec loop l les =
    match l with
    | [] -> les
    | _  -> let (m, e) = max l in loop e (m :: les)
  in loop l []
  ;;

let rec print_list l =
  match l with
  | []      -> print_string "\n"
  | x :: xs -> print_int x; if xs <> [] then print_string " "; print_list xs
  ;;

let make_list a b c = a::(b::(c::[]));;

let () =
  Scanf.sscanf(read_line()) "%d %d %d" (
    fun a b c -> print_list (sort (make_list a b c))
    )
    ;;

