#include <iostream>
using namespace std;
int main()
{
    int t;
    int n[100],m[100],k[100];
    cin>>t;
    for(int i=0;i<t;i++)
        {
            cin>>n[i]>>m[i]>>k[i];
        }
    for(int i=0;i<t;i++)
    if(n[i]<k[i])
        {cout<<"Nie"<<endl;}
    else
        if(n[i]>=m[i])
       {cout<<"Nie"<<endl;}
    else cout<<"Tak"<<endl;
    return 0;
}