import math import sys def main(): input = sys.stdin.read().split() ptr = 0 m = int(input[ptr]) ptr += 1 results = [] for _ in range(m): a = int(input[ptr]) b = int(input[ptr+1]) t = float(input[ptr+2]) ptr +=3 if a == 0: tb = t ** (1.0 / b) n = math.exp(tb) elif b == 0: n = t ** (1.0 / a) else: # Define the function to compute n^a (ln n)^b def f(n_val): try: log_n = math.log(n_val) except: return float('inf') log_pow = log_n ** b if log_pow == 0: return 0.0 n_pow = n_val ** a return n_pow * log_pow # Find upper bound low = 1.0 high = 1.0 while True: current = f(high) if current > t: break high *= 2 # Binary search eps = 1e-15 for _ in range(100): mid = (low + high) * 0.5 val = f(mid) if val < t: low = mid else: high = mid if high - low < eps: break n = (low + high) * 0.5 # Format to 12 decimal places results.append("{0:.12f}".format(n)) # Output all results print('\n'.join(results)) if __name__ == "__main__": main()