#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <numeric>
#include <random>
#include <vector>
#include <array>
#include <bitset>
#include <queue>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>

using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr ll TEN(int n) { return (n==0) ? 1 : 10*TEN(n-1); }
int bsr(int x) { return 31 - __builtin_clz(x); }

const double E = exp(double(1));

double get(int a, int b, double x) {
    double ans = 1;
    for (int i = 0; i < a; i++) {
        ans *= x;
    }
    double lx = log(x);
    for (int i = 0; i < b; i++) {
        ans *= lx;
    }
//    return pow(x, a)*pow(log(x), b);
    return ans;
}
double calc(int a, int b, double t) {
    if (a == 0) {
        return pow(E, pow(t, 1.0/b));
    }
    if (b == 0) {
        return pow(t, 1.0/a);
    }
    double l = 1, r = 101;
    for (int i = 0; i < 40; i++) {
        double md = (l+r)/2;
        double x = get(a, b, md);
        if (x < t) {
            l = md;
        } else {
            r = md;
        }
    }
    return l;
}

int main() {
    int m;
    scanf("%d", &m);
    for (int i = 0; i < m; i++) {
        int a, b; double t;
        scanf("%d %d %lf", &a, &b, &t);

        printf("%.12lf\n", calc(a, b, t));
    }
    return 0;
}