Scanf.scanf" %d %d %d"@@fun a b k->
	let rec f a b t k = match t,k with
	| ( _,0) -> (a,b)
	| (`A,k) -> f (a/2) (b+a/2) `B (k-1)
	| (`B,k) -> f (a+b/2) (b/2) `A (k-1)
	in let a,b = f a b `A k
	in Printf.printf "%d %d" a b