main = getLine >>= mapM_ putStrLn . solve . read solve :: Int -> [String] solve n = foldr ff [] [1..n] where ff x acc | mod x 15 == 0 = "FizzBuzz" : acc | mod x 3 == 0 = "Fizz" : acc | mod x 5 == 0 = "Buzz" : acc | otherwise = show x : acc