#include <iostream>
#include <algorithm>
using namespace std;

int main() 
{
	int T;
	cin>>T;
	while(T--)
	{   
	    int N,i,j,max=0,count=1;
	    cin>>N;
	    int A[N];
	    for(i=0;i<N;i++)
	    {
	        cin>>A[i];
	    }
	    for(i=1;i<N;i++)
	    {
	        
	        if(A[i-1]==A[i])
	        {
	            count++;
	        }
	        else
	        {
	            if(count>max)
	            {
	                max=count;
	            }
	            count=1;
	        }
	    }
	    if(count>max)
	            {
	                max=count;
	            }
	    cout<<max<<endl;
	}
}
