#include <stdio.h>
#include<stdlib.h>
int main()
{
int t = 0;
int a = 0,b = 0,L =0 ;
int count = 0;
scanf("%d",&t);
while(t--)
{
scanf("%d%d%d",&a,&b,&L);
if(a<=b && a <= L)//如果白天爬的高度小于晚上的高度,同时白天爬的高度不大于井长。
{
printf("%d\n",-1);
continue;
}
count=0;
L -= a;
if(L<0)//如果小于零则表示白天一次就能到达井外
{
printf("%d\n",1);
continue;
}
count += L/(a-b);
count += 2;//L -= a;加一次,后面加的一次是L/(a-b);因为不管L%(a-b)是否等于零都要加一次。
printf("%d\n",count);
}
// system("pause");
return 0;
}