Lightning Lessons

Time limit1sMemory limit128 MB

Problem

Zeus wrung his hands nervously. "I've come to you because I agreed to duel Thor at the upcoming Godfest. You're good in a fight, Raiden — you've got to help me!"

Raiden, smiling thinly beneath the rim of his hat, replied, "What help could I offer a god as mighty as you? Your thunderbolts are the stuff of legend!" Zeus looked down and stammered, "I've... I've just been lucky. I don't actually know how the thunderbolts work. Sometimes I turn my foe into a charred heap, but other times... weird stuff happens. If Apollo hadn't convinced the bards to keep my secret, I'd be a laughingstock."

Raiden raised an eyebrow. "Weird stuff?" Zeus took a deep breath. "Sometimes it just fizzles out. Other times it rolls up and turns into a... a bunny." Raiden burst out laughing. "A bunny! That's some chi you've got there." As Zeus began to redden, Raiden held up a hand. "Don't worry, I'll help you out."

Raiden explained. "A thunderbolt is a sequence of chi pivots — 'zigs and zags', as the mortals call them. Each pivot carries an integer amplitude —"

"Yes, I know that much," Zeus interrupted. "But lightning is lively and unpredictable. The amplitudes go all random once the bolt strikes!"

"Not all that flickers is flame. Watch a bolt closely and you'll see it passes through cycles, losing one pivot on each cycle. On every cycle each pivot after the first is reduced by the amplitude of the pivot before it (as measured at the end of the previous cycle), and the first pivot vanishes — so the amplitudes $a_1, a_2, \dots, a_k$ become $a_2 - a_1,\ a_3 - a_2,\ \dots,\ a_k - a_{k-1}$, one shorter. If a bolt ever reaches a state in which every amplitude is $0$, it converges and zaps its target with power proportional to how many cycles came before. Your 'weird stuff' happens only when a bolt instead shrinks all the way down to a single non-zero amplitude: a positive amplitude fizzles out into waste heat, while a negative amplitude leaves an odd, low-entropy state. It is the latter you have seen hopping away in the heat of battle."

Help Zeus save face: write a program that predicts how powerful a bolt will be if it converges, or what becomes of it if it diverges.

Input

The first line contains a single positive integer $N$, the number of lightning bolts that follow. Each of the next $N$ lines describes one bolt: it begins with an integer $M$ ($0 < M \le 20$), the number of pivots, followed by $M$ space-separated integers giving the initial amplitude of each successive pivot. No initial amplitude exceeds $1000$ in absolute value.

Output

For each bolt that converges, print the letter z repeated $P$ times, immediately followed by ap! — where $P$ is the number of cycles applied to reach the all-zero state (that final all-zero state itself does not count as a cycle).

For each bolt that never converges, print *fizzle* if its final single amplitude was positive, or *bunny* if it was negative.