Given a snippet of fizz buzz output with all numbers removed, fill in the correct numbers with the lowest possible values such that the fizz buzz snippet is correct. For the purposes of this challenge,
buzz have their usual values of 3 and 5, respectively.
If the input is an invalid sequence of
buzz and empty lines, then instead output just
zzubzzif (with or without newlines).
Input and output may be newline separated lines, or whatever array-of-strings format is convenient to your language.
You may ignore or do whatever you like with capitalisation.
You will need to choose to handle one or more of these:
buzz fizz, etc, but you must choose at least one of these formats.
You may assume that all input is some sequence of
buzz and empty lines.
2 fizz 4
buzz fizz 7
13 14 fizzbuzz 16 17