main=do x<-readLn putStr$unlines$c x c 1=show 1:[] c x|odd x=show x:c(x*3+1)|True=show x:c(x`div`2)