C++ 代码
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
string a,b;
cin>>a>>b;
if(a[0]==b[0]) cout<<"Tie";
else if(a[0]=='H'&&b[0]=='G'||a[0]=='G'&&b[0]=='B'||a[0]=='B'&&b[0]=='H') cout<<"Player1";
else cout<<"Player2";
cout<<endl;
}
return 0;
}