Nice Editorial
1 Like
//my solution in c++enter code here
using namespace std;
int main()
{
long long int t;
cin>>t;
for(long long i=0;i<t;i++){
long long int n;
cin>>n;
long long x=0,y=0;
string temp,b,temp1;
for(long long j=0;j<n;j++){
if(x==0){
cin>>b;
temp=b;
x=x+1;//x=1
continue;
}
if(x>=1){
cin>>b;
if(b!=temp){
y=y+1;
temp1=b;
}
if(b==temp){
x=x+1;
}
}
}
if(x>y){cout<<temp<<endl;};
if(x==y){cout<<"Draw"<<endl;};
if(x<y){cout<<temp1<<endl;};
}
}