#include<bits/stdc++.h>
using namespace std;

void solve()
{
	int a, b, c;
	cin >> a >> b >> c;
	while (true)
	{
		if (c % 2 == 0)
		{
			if (a == 0) 
			{
				cout << "Aoki" << endl;
				return;
			}
			a--;
		}
		else{
			if (b == 0) 
			{
				cout << "Takahashi" << endl;
				return;
			}
			b--;
		}
		c++;
	}
}

int main()
{
	int t = 1;
	// cin >> t;
	while (t--)
	{
		solve();
	}
	return 0;
}

//7.21
//rng_58 bless me

#include<bits/stdc++.h>
using namespace std;
//define:
#define ll long long
#define REP(i,n) for(int i = 0; i < n; i++)
//fast io:
inline int Read() {
	int s = 0,f = 1;
	char ch = getchar();
	while(ch < '0' || ch > '9'){
		if(ch == '-') {
			f = -1;
		}
		ch = getchar();
	}
	while(ch >= '0' && ch <= '9') {
		s = s * 10 + ch - '0';
		ch = getchar();
	}
	return s * f;
}
inline void Wte(ll x) {
    if(x < 0) {
    	putchar('-');
		x = -x;
	}
    if(x > 9)  {
		Wte(x / 10);
	}
    putchar(x % 10 + '0');
}
inline void Write(ll x) {
	Wte(x);
	putchar(' ');
}
//const:
const int MAXN = 0;
//something:
int L,R;
//run:
void solve() {
	L = Read(); R = Read();
	ll N = R - 2 * L + 1;
	if(N < 0) {
		puts("0");
		return;
	}
	Write(N * (N + 1) * 1ll / 2); puts("");
}
//times:
void Times(int T) {
	while(T--) {
		solve();
	}
}
//begin:
int main() {
	int T;
	T = 1;
	T = Read();
	Times(T);
	return 0;
}
