package yukicoder; import java.util.*; public class Q456 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(); while (m-- > 0) { double a = sc.nextDouble(); double b = sc.nextDouble(); double t = sc.nextDouble(); double ans; if (a == 0) { t = Math.pow(t, 1 / b); ans =Math.exp(t); } else if (b == 0) { t = Math.pow(t, 1 / a); ans = t; } else { double curN = 30; for (int i = 0; i < 10; ++i) { double y = -t + pow(curN, (int) a) * pow(Math.log(curN), (int) b); double yDiff = a * pow(curN, (int) a - 1) * pow(Math.log(curN), (int) b) + b * pow(curN, (int) a - 1) * pow(Math.log(curN), (int) b - 1); curN = curN - y / yDiff; } ans = curN; } System.out.printf("%.12f\n",ans); } } static double pow(double a, int n) { double ret = 1; for (; n > 0; n >>= 1, a *= a) { if (n % 2 == 1) { ret *= a; } } return ret; } }