n=int(input())
for i in range(n):
a=list(map(int,input().split()))
s=a[0]
h=a[1]
w=a[2]
if s==1:
if h<130 and w<27:
print("duo chi yu! duo chi rou!")
elif h<130 and w==27:
print("duo chi yu! wan mei!")
elif h<130 and w>27:
print("duo chi yu! shao chi rou!")
elif h==130 and w<27:
print("wan mei! duo chi rou!")
elif h==130 and w==27:
print("wan mei! wan mei!")
elif h==130 and w>27:
print("wan mei! shao chi rou!")
elif h>130 and w<27:
print("ni li hai! duo chi rou!")
elif h>130 and w==27:
print("ni li hai! wan mei!")
elif h>130 and w>27:
print("ni li hai! shao chi rou!")
elif s==0:
if h<129 and w<25:
print("duo chi yu! duo chi rou!")
elif h<129 and w==25:
print("duo chi yu! wan mei!")
elif h<129 and w>25:
print("duo chi yu! shao chi rou!")
elif h==129 and w<25:
print("wan mei! duo chi rou!")
elif h==129 and w==25:
print("wan mei! wan mei!")
elif h==129 and w>25:
print("wan mei! shao chi rou!")
elif h>129 and w<25:
print("ni li hai! duo chi rou!")
elif h>129 and w==25:
print("ni li hai! wan mei!")
elif h>129 and w>25:
print("ni li hai! shao chi rou!")
01-23
404
08-10
1597