#//include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#define ll long long
#define endl "\n"
using namespace std;

//Comparitive function to reverse a vector
bool reverse(ll a, ll b)
{
    return a > b;
}


int main() {

	//For fast IO
	ios_base::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);


	ll t;
	cin >> t;
	while (t--)
	{
		ll n;
		cin >> n;
		vector<ll> cnt(n);
		for (ll i = 0; i < n; i++)
		{
			ll a;
			cin >> a;
			a--;
			cnt[a]++;
		}
		cout << *max_element(cnt.begin(), cnt.end()) << endl;

	}
}






