#include <stdio.h>
#include <math.h>
/*#include <complex.h> */

int main()
{

   float L1,L2,m1,m2,u11,u12,u21,u22,L,Rf,Rh ;
   float a,b,c,d,F0,H0,B,C,D;
   int N;
/*   float_complex IL1,IL2,Im1,Im2,Iu11,Iu12,Iu21,Iu22,l1(1,0),l2(1,0);*/

   scanf("%d\n",&N);
   for(;N>0;N--)
   {
      scanf("%f %f\n",&a,&b);
      scanf("%f %f\n",&d,&c);
      scanf("%f %f\n",&H0,&F0);
      scanf("\n");
      b=-b;B=-(a+d);C=a*d-c*b;D=B*B-4*C;

      
      if(D>0)
      {
        	L1=(-B+sqrt((double)D))/2;
                L2=(-B-sqrt((double)D))/2;
                
                if(fabs(L1)<1&&fabs(L2)<1)
                   {printf("Ecological balance will develop.\n");goto konec;}
                
                u11=1;
                u21=(-(a-L1))/b;
                u12=1;
                u22=(-(a-L2))/b;
                
                m2=(H0-F0*(u21/u11))/(u22-(u12*u21/u11));
                m1=(H0-m2*u12)/u11;
                
                if(fabs(L1)<fabs(L2)&&L2>1)
                {
                	if(m2*u12>0)
                        {
                        	if(m2*u22>0)
                                {printf("Both hares and foxes will overgrow.\n");goto konec;}
                                else if(m2*u22<0)
                                {printf("Hares will overgrow while foxes will die out.\n");goto konec;}
                        }
                        else
                        if(m2*u12<0)
                        {
                        	if(m2*u22>0)
                                {printf("Hares will die out while foxes will overgrow.\n");goto konec;}
                                else if(m2*u22<0)
                                {printf("Both hares and foxes will die out.\n");goto konec;}
                        }
                }
                
                if(L1>1&&fabs(L2)<fabs(L1))
                {
                	if(m1*u11>0)
                        {
                        	if(m1*u21>0)
                                {printf("Both hares and foxes will overgrow.\n");goto konec;}
                                else if(m1*u21<0)
                                {printf("Hares will overgrow while foxes will die out.\n");goto konec;}
                        }
                        else
                        if(m1*u11<0)
                        {
                        	if(m1*u21>0)
                                {printf("Hares will die out while foxes will overgrow.\n");goto konec;}
                                else if(m1*u21<0)
                                {printf("Both hares and foxes will die out.\n");goto konec;}
                        }
                }
                else {printf("Chaos will develop.\n");goto konec;}
                
      }
       if(D<0) 
      {
       /* 	IL1=(-B+sqrt((float_complex)D))/2;
                IL2=(-B-sqrt((float_complex)D))/2;
                
                if(abs(IL1)<1&&abs(IL2)<1)
       */         
                L1=sqrt((-B/2)*(-B/2)+(-D)/4);
                                
                if(L1<1)
                   {printf("Ecological balance will develop.\n");goto konec;}
                     
/*                Iu11=1;
                Iu21=(-(a-IL1))/b;
                Iu12=1;
                Iu22=(-(a-IL2))/b;
                
                Im2=(H0-F0*(Iu21/Iu11))/(Iu22-(Iu12*Iu21/Iu11));
                Im1=(F0-Im2*Iu12)/Iu11;
                
                for(i=0;i<20;i++)
                {  	l1=l1*IL1;
                        l2=l2*IL2;
                	printf("%f\t%f\n",real(Im1*Iu11*l1+Im2*Iu12*l2),imag(Im1*Iu21*l1+Im2*Iu22*l2));
                }*/
        	
         	printf("Chaos will develop.\n");goto konec;
                
      }
      
      if(D==0)
      {
        	L=-B/2;
                u12=1;
                u22=-(a-L)/b;
                u11=1;
                u21=(u12-u11*a)/b;
                
                m2=(H0-F0*(u21/u11))/(u22-(u12*u21/u11));
                m1=(H0-m2*u12)/u11;
                
                
                Rf=(m1*u11+m2*u12)*L+(m1*u12);
                Rh=(m1*u21+m2*u22)*L+(m1*u22);
                
                if(fabs(L)<1){printf("Ecological balance will develop.\n");goto konec;}
                if(Rf==0&&Rh==0){printf("Ecological balance will develop.\n");goto konec;}
                if(L>1)
                {
                	if(Rf>0)
                        {
                        	if(Rh>0){printf("Both hares and foxes will overgrow.\n");goto konec;}
                                else if(Rh<0)
                                   	{printf("Hares will die out while foxes will overgrow.\n");goto konec;}
                        }
                        else
                        if(Rf<0)
                        {
                        	if(Rh>0){printf("Hares will overgrow while foxes will die out.\n");goto konec;}
                                else if(Rh<0)
                                   	{printf("Both hares and foxes will die out.\n");goto konec;}
                        }
                }
                else {printf("Chaos will develop.\n");goto konec;}
                
        
      }
      
/*      printf("re = %f \t im = %f\n",real(L1),imag(L1));

      printf("%f\n",fabs(L1));*/
/*      printf("%f %f\n",H0,F0); */

konec: ;

   }
 return 0;
}
