Hares and Foxes

Time limit1sMemory limit128 MB

Problem

A theatre company stages a comedy in which many animals appear. To make the play as realistic as possible, a specialist studies how the animals behave, and he is currently interested in a two-species dynamic ecological system of hares and foxes. You are asked to build an automatic simulator that predicts the long-term fate of this system.

The system evolves according to the following standard model, a pair of difference equations:

$$h_{y+1} = a h_y - b f_y$$ $$f_{y+1} = c f_y + d h_y$$

Here $h_y$ and $f_y$ are the differences between the hare and fox populations in year $y$ and a reference count fixed at the start of the experiment. Their units are unknown, so $h_y$ and $f_y$ are treated as real numbers. Starting from the year-1998 values $h_{1998}$ and $f_{1998}$, determine the long-term evolution of the system.

Input

The input contains $N$ test cases. The first line holds the single positive integer $N$. Each case then gives six real numbers $a, b, c, d, h_{1998}, f_{1998}$ in this order, on three lines with two numbers per line, separated by one or more spaces. Each number uses the classical format (an optional sign, a sequence of digits, an optional decimal point, and an optional sequence of digits), and its text form is at most 10 characters long.

Output

For each case, print exactly one of the following sentences:

  • Ecological balance will develop. — if, after a sufficiently long time, both populations approach the reference count with arbitrary given precision, that is $\lim h_y = 0$ and $\lim f_y = 0$.
  • Hares will die out while foxes will overgrow. — if $\lim h_y = -\infty$ and $\lim f_y = +\infty$.
  • Hares will overgrow while foxes will die out. — if $\lim h_y = +\infty$ and $\lim f_y = -\infty$.
  • Both hares and foxes will die out. — if $\lim h_y = -\infty$ and $\lim f_y = -\infty$.
  • Both hares and foxes will overgrow. — if $\lim h_y = +\infty$ and $\lim f_y = +\infty$.
  • Chaos will develop. — if none of the above descriptions fits.