#include<bits/stdc++.h>
#define sz 20005
using namespace std;
long dp[sz];
int main()
{
long koyta,route,i,j,mx_sum,sum,index1,index2,now,counter,mx_counter;
scanf("%ld",&koyta);
for(i=1;i<=koyta;i++)
{
scanf("%ld",&route);
for(j=1;j<route;j++)
{
scanf("%ld",&dp[j]);
}
sum=mx_sum=0;
now = 1;
counter=mx_counter=0;
for(j=1;j<route;j++)
{
sum+=dp[j];
counter++;
if(sum<0)
{
sum = 0;
counter = 0;
now = j+1;
}
else if(sum>mx_sum)
{
mx_sum = sum;
mx_counter = counter;
index1 = now;
index2 = j+1;
}
else if(sum==mx_sum && counter>mx_counter)
{
mx_counter = counter;
index1 = now;
index2 = j+1;
}
}
if(mx_counter==0)
{
printf("Route %ld has no nice parts\n",i);
}
else
{
printf("The nicest part of route %ld is between stops %ld and %ld\n",i,index1,index2);
}
}
return 0;
}