#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;
#define int long long
const int N = 200010;
void solve()
{
int n;cin>>n;
int last;cin>>last;
int cnt=0,tmp=0,res=0;
for(int i=2;i<=n;i++)
{
int x;cin>>x;
if(last>x)
{
if(cnt)cnt--,tmp++;
else res++,cnt=tmp-1,tmp=1;
}
else tmp++;
last=x;
}
cout<<res+1<<endl;
}
signed main()
{
int T;
cin>>T;
while(T--)solve();
}
11-06
230
09-06
2049
10-28
175