main = do n <- readLn mapM_ putStrLn $ fizzBuzz [1..n] fb :: Integer -> String fb x | x `mod` 15 == 0 = "FizzBuzz" | x `mod` 3 == 0 = "Fizz" | x `mod` 5 == 0 = "Buzz" | otherwise = show x fizzBuzz :: [Integer] -> [String] fizzBuzz (x:xs) | xs == [] = [fb x] | otherwise = fb x : fizzBuzz xs