using namespace std;

#include<stdio.h>

#include<stdlib.h>

#include

#include

int main()

{

```
int t;
scanf("%d",&t);
while(t--)
{
long long unsigned x=1,z=1,n,i;
scanf("%lld %lld %lld",&x,&z,&n);
for(i=1;i<=(n/2 + n%2);i++)
{
x=x*2;
}
for(i=1;i<=n-(n/2 + n%2);i++)
{
z=z*2;
}
printf("%lld\n",max(x,z)/min(x,z));
}
return 0;
```

}