#include <iostream>
#include<string.h>
using namespace std;
char Lleft[][];
char Lright[][];
char result[][];
bool wight(char c,bool b); int main(){
int n;
cin>>n;
for(int i=;i<=n;i++) { for (int j = ; j < ; ++j) {
cin>>Lleft[i]>>Lright[i]>>result[i]; } char c;
for (c = 'A'; c <= 'L'; c++) {
if (wight(c, )) {
cout << c << "is ," << "heavy";
break;//第一次忘记加break了,感觉哪里不对劲但是就是忘记了
}
if (wight(c, )) { cout << c << "is," << "light";
break;
} }
}
}
bool wight(char c,bool b){ for (int i = ; i < ; ++i) { //这步把轻的中的左边赋值给了一个指针,这样两个问题可以化成一个
//本来写的是弄成两个分开挨个想,唉其实还是错误率高啊 char *Left,*Right;
if(b){
Left=Lleft[i];
Right=Lright[i];
}
else{
Right=Lleft[i];
Left=Lright[i]; }
switch(result[i][]){
case'u':
if(strchr(Right,c)==NULL){
return false;
}
break;
case 'e':
if(strchr(Right,c)||strchr(Left,c)){
return false;
}
break;
case 'd':
if(strchr(Left,c)==NULL){
return false;
}
break;
} }
return true;
}