from math import log q=int(input()) ANS=[-1]*q for tests in range(q): a,b,t=map(float,input().split()) # n**a * log(n)**b = t if a==0: ANS[tests]=2.718281828459045**(t**(1/b)) continue if b==0: ANS[tests]=t**(1/a) continue MAX = 10 MIN = 0 tb = t**(1/b) while MAX-MIN>10**(-9): mid=(MAX+MIN)/2 if (mid ** (a/b)) * log(mid)>=tb: MAX=mid else: MIN=mid ANS[tests]=(MAX+MIN)/2 print("\n".join(map(str,ANS)))