Zzub Zzif (reverse Fizz Buzz) 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, fizz and buzz have their usual values of 3 and 5, respectively.

If the input is an invalid sequence of fizz, 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: fizzbuzz, fizz buzz, buzz fizz, etc, but you must choose at least one of these formats.

You may assume that all input is some sequence of fizz, buzz and empty lines.

Examples

Input:



fizz

    

Output:

2
fizz
4


Input:


buzz
fizz



Output:

buzz
fizz
7


Input:




fizzbuzz




Output:

13
14
fizzbuzz
16
17


Input:





Output:

1


Input:


fizz
fizz



Output:

zzubzzif


Input:







Output:

zzubzzif
Java, 205 bytes

s-&gt;{o:for(int i=0,j,h=s.length;++i&lt;16;){for(j=h;j--&gt;0;)if(s[j].contains(&quot;fizz&quot;)^(i+j)%3&lt;1||s[j].contains(&quot;buzz&quot;)^(i+j)%5&lt;1)continue o;String z=i+&quot;&quot;;for(j=1;j&lt;h;)z+=&quot;\n&quot;+(i+j++);return z;}return&quot;zzubzzif&quot;;}

Takes a String[] as input and returns a String.
Expanded, runnable code:
public class C {

    static final java.util.function.Function&lt;String[], String&gt; f = s -&gt; {
        o:
        for (int i = 0, j, h = s.length; ++i &lt; 16;) {
            for (j = h; j --&gt; 0;) {
                if (s[j].contains(&quot;fizz&quot;) ^ (i + j) % 3 &lt; 1 ||
                    s[j].contains(&quot;buzz&quot;) ^ (i + j) % 5 &lt; 1) {
                    continue o;
                }
            }
            String z = i + &quot;&quot;;
            for (j = 1; j &lt; h;) {
                z += &quot;\n&quot; + (i + j++);
            }
            return z;
        }
        return &quot;zzubzzif&quot;;
    };

    public static void main(String[] args) {
        System.out.print(f.apply(new String[]{&quot;fizz&quot;, &quot;&quot;, &quot;buzz&quot;}));
    }
}