double t,n;i;main(a,b){for(gets(&a);i=~scanf("%d%d%lf",&a,&b,&t);printf("%.10f\n",exp(n)))for(n=t=log(t);++i<20;n-=(a*n+b*log(n)-t)/(a+b/n));}