#include <iostream>

#include <cstring>

using namespace std;

 

 

 
char Left[3][7];

   
char Right[3][7];

   
char result[3][7];

   
bool Isfake(char c,bool light);

       
bool Isfake(char c,bool light)

    {

       
for(int i=0;i<3;i++)

       
{

           
char *pLeft,*pRight;

           
if(light){

                pLeft=Left[i];

                pRight=Right[i];

           
}

           
else{

                pLeft=Right[i];

                pRight=Left[i];

           
}

           
switch(result[i][0]){

       
case'u':

           
if(strchr(pRight,c)==NULL)//可以查找字符串s中首次出现字符c的位置。

                return false;

           
break;

       
case'e':

           
if(strchr(pLeft,c)||strchr(pRight,c))

                return false;

           
break;

       
case'd':

           
if(strchr(pLeft,c)==NULL)

                return false;

           
break;

           
}

       
}

       
return true;

    }

int main()

{

 

   
int t;

   
cin>>t;

   
while(t--)

    {

       
for(int i=0;i<3;++i)

           
cin>>Left[i]>>Right[i]>>result[i];

       
for(char c='A';c<='L';c++)

       
{

           
if(Isfake(c,true))

           
{

                cout<<c<<"这是一枚轻的假硬币";

       
        break;

           
}

           
else if(Isfake(c,false))

           
{

                cout<<c<<"这是一枚硬的假硬币";

                break;

           
}

       
}

    }

   
return 0;

}