include [HTML_REMOVED]
using namespace std;
string abc(const string& p1,const string& p2){
if(p1==p2) return “Tie”;
if((p1==”Hunter”&&p2==”Gun”)||(p1==”Gun”&&p2==”Bear”)||(p1==”Bear”&&p2==”Hunter”)){
return “Player1”;
}
else return “Player2”;
}
int main(){
int n;
cin >> n;
while(n–){
string a,b;
cin >> a >> b;
cout << abc(a,b) << endl;
}
return 0;
}