#define _CRT_SECURE_NO_WARNINGS

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef queue<ll> qll;
typedef queue<pll> qpll;
typedef vector<string> vs;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<pll> vpll;
typedef vector<vs> vvs;
typedef vector<vi> vvi;
typedef vector<vll> vvll;

#define forn(i, n) for ((i) = 0; (i) < (n); (i)++)
#define form(i, m, n) for ((i) = m; (i) < (n); (i)++)
#define bforn(i, n) for ((i) = n - 1; (i) >= 0; (i)--)
#define bform(i, m, n) for ((i) = n - 1; (i) >= (m); (i)--)
#define vsort(v) sort((v).begin(), (v).end())
#define mod 1000000007;
#define PaNika               \
    ios::sync_with_stdio(0); \
    cin.tie(0);              \
    cout.tie(0);             \
    cout.precision(20);
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    PaNika;

    ll t;
    cin >> t;
    while (t--)
    {
        ll n, m, i, k = 1;
        vll a;

        cin >> n;
        forn(i, n)
        {
            cin >> m;
            a.push_back(m);
        }
        m = 1;

        form(i, 1, n)
        {
            if (a[i] == a[i - 1])
            {
                k++;
                m = max(m, k);
            }
            else
            {
                m = max(m, k);
                k = 1;
            }
        }

        cout << m << endl; 
    }

    return 0;
}