#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define all(v) v.begin(),v.end()
#define endll "\n"

#define fin             freopen("input.txt","r",stdin);
#define fout            freopen("output.txt","w",stdout);

void solve(){
    int n;
    cin >> n;
    vector<int>v(n);
    for(int i=0;i<n;i++){
        cin >> v[i];
    }

    int c=0,ans=0;
    for(int i=1;i<n;i++){
        if(v[i]==v[i-1])c++;
        else{
            ans=max(c,ans);
            c=0;
        }
    }
    ans=max(c,ans);
    cout << ans+1 << endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t;
    cin >> t;
    while(t--){
        solve();
    }

    return 0;
}

