import Data.List g::Integer -> [Integer] g x |x==1 =[1] |x `mod` 5 ==0 =[x] ++ g (x `div` 5) |otherwise =[x] f :: Integer -> [Integer] f x |x `mod` 2==0 =[x] ++ (f (x `div` 2)) ++ (g x) |otherwise =[x] ++ g x main = do x <- getLine let y=read x :: Integer z=10^y ans=f z mapM_ putStrLn $ map show $ sort $ nub ans