let rec f i x a=let w=truncate(2.**float i)in if w=x then w::a else if w<x then f(i-1)(x-w)(w::a)else f(i-1)x a and q()=q(List.iteri(fun i e->Printf.printf(if i=0then"%d"else" %d")e)(f 9(read_int())[]);print_newline());;try q()with _->()