void main()
{
int zz,ii,n,i,j,k,t,max,shuzu[100004][2];
scanf("%d",&zz);
for(ii=1;ii<=zz;ii++)
{
scanf("%d",&n);
for(i=0;i
scanf("%d",&shuzu[i][0]);
if(i==0)
{
shuzu[i][1]=shuzu[i][0];
max=shuzu[0][1];
t=0;
k=0;
}
else
{
if(shuzu[i-1][1]>=0)
shuzu[i][1]=shuzu[i-1][1]+shuzu[i][0];
else
shuzu[i][1]=shuzu[i][0];
}
if(shuzu[i][1]>max)
{
max=shuzu[i][1];
k=i;
}
}
for(i=k;max>0;i--)
max=max-shuzu[i][0];
t=i+1;
printf("Case %d:\n",ii);
printf("%d %d %d\n",shuzu[k][1],t+1,k+1);
if(ii
}
}