cswork / OAOpen practice workspace

CiscoOA #1

FizzBuzz Variant

Estimated EasyJudge-ready

Topics (AI-labelled)Simulation

For the integers 1..N in increasing order, output one line per integer: FizzBuzz if it is divisible by both 3 and 5; Fizz if it is divisible only by 3; Buzz if it is divisible only by 5; otherwise the integer itself.

Input

The input is a single integer N. The complete original bound from the OCR and Fastprep is 0<N<2×10^6, i.e. 1≤N≤1999999; it must not be miswritten as ≤2000000.

Output

Output N lines, with the exact capitalization Fizz, Buzz, FizzBuzz; a newline after the last line is allowed.

Example 1

Input:

5

Output:

1
2
Fizz
4
Buzz

Example 2

Input:

15

Output:

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz

Example 3

Input:

1

Output:

1

Example notes

The outputs of the three public examples are, in order: 1 / 2 / Fizz / 4 / Buzz; 1 / 2 / Fizz / 4 / Buzz / Fizz / 7 / 8 / Fizz / Buzz / 11 / Fizz / 13 / 14 / FizzBuzz; 1. Verified by independent enumeration or direct simulation.

Editorial

Loading solution…