include[HTML_REMOVED]
using namespace std;
int main(){
string a[1000];
int T,i=0;
cin>>T;
while(cin>>a[i])
i++;
for(int j=0;j<T*2;j=j+2)
{
if(a[j]==a[j+1])
cout<<”Tie\n”;
else if(a[j]==”Hunter”&&a[j+1]==”Gun”||a[j]==”Gun”&&a[j+1]==”Bear”||a[j]==”Bear”&&a[j+1]==”Hunter”)
cout<<”Player1\n”;
else
cout<<”Player2\n”;
}
}