You will be given a String that only contains letters of the English Alphabet, both lowercase and uppercase (ASCII 65-90 and 97-122). Your task is to output the Fizz-Buzzified version of the String.
How to Fizz-Buzzify a String?
Each letter that has an even index in the English alphabet (the alphabet must be 1-indexed:
a->1,b->2,...,z->26) will be turned into
fizzif it is lowercase and
FIZZif it is uppercase (
f -> fizz, F -> FIZZ).
Each letter that has an odd index in the English alphabet will be turned into
buzzif it is lowercase, and
BUZZif it is uppercase (
e -> buzz, E -> BUZZ).
Let's have an example, to illustrate the algorithm, using the string
CodeGolf(spaces added for clarity):
"C o d e G o l f" -> "BUZZ buzz fizz buzz BUZZ buzz fizz fizz" ^ ^ ^ ^ ^ ^ ^ ^ 1 1 0 1 1 1 0 0 (1 is odd index, 0 is even index)
If it is more convenient for your language, you may also leave single spaces between the groups (
fizz, buzz, FIZZ, BUZZ). Hence, a result like
fizzBUZZbuzzbuzzcan also be returned as
fizz BUZZ buzz buzz. Other separators are not allowed.
Input -> Output "egg" -> "buzzbuzzbuzz" "CodeGolf" -> "BUZZbuzzfizzbuzzBUZZbuzzfizzfizz" "Reset" -> "FIZZbuzzbuzzbuzzfizz" "ATOM" -> "BUZZFIZZBUZZBUZZ" "yOuArEgReAt" -> "buzzBUZZbuzzBUZZfizzBUZZbuzzFIZZbuzzBUZZfizz"