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

let sort l =
	let rec sort' l res =
		match l with
		|[] -> res
		|_ -> let (m,e) = max l in sort' e (m::res)
	in
	sort' 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::[]));;

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

