#include <bits/stdc++.h>
using namespace std;
vector <int> ans;
int v[101];
void solve ()
{
    int n;
    cin >> n;
    for (int i = 1;i<=n;++i)
        cin >> v[i];
    ans.push_back(v[1]);
    for (int i = 2;i<=n;++i)
    {
        int place = -1;
        for (int j = 0;j<ans.size();++j)
            if (ans[j] < v[i])
                place = j;
        if (place!=-1)
            ans[place] = v[i];
        else
            ans.push_back(v[i]);
    }
    cout << ans.size() << '\n';
    ans.clear();
    return ;
}
int main ()
{
    int t;
    cin >> t;
    while (t--)
        solve();
}
