Scanf.(Array.(scanf" %d"@@fun n->
	let a=init n (fun _->scanf" %d"@@fun v->v) in
	let b=map (fun v->v) a in sort compare b;
	let l,r=b.(n/2-1),b.(n/2) in
	iter (fun v->print_int@@if v<=l then r else l;print_newline()) a))