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