import java.util.HashMap; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); HashMap hashmap = storageNumber(); int three = hashmap.get("three"); int five = hashmap.get("five"); for (int i = hashmap.get("one"); i <= num; i++) { if ((i % three == hashmap.get("zero")) && (i % five == hashmap.get("zero"))) { System.out.println("FizzBuzz"); } else if (i % three == hashmap.get("zero")) { System.out.println("Fizz"); } else if (i % five == hashmap.get("zero")) { System.out.println("Buzz"); } else { System.out.println(i); } } sc.close(); } static HashMap storageNumber() { HashMap hashmap = new HashMap<>(); hashmap.put("zero", "".length()); hashmap.put("one", "l".length()); hashmap.put("two", "lZ".length()); hashmap.put("three", "lZE".length()); hashmap.put("four", "lZEA".length()); hashmap.put("five", "lZEAS".length()); hashmap.put("six", "lZEASb".length()); hashmap.put("seven", "lZEASbL".length()); hashmap.put("eight", "lZEASbLB".length()); hashmap.put("nine", "lZEASbLBq".length()); return hashmap; } }