#include <iostream>

using namespace std;

int main()
{
   int test;
   cin >> test;
   int n[test],m[test],k[test];
   for(int i = 0; i< test ; i++)
   cin>>n[i]>> m[i]>>k[i];
   for(int i = 0; i < test;i++)
   {

   if(m[i]/n[i]==1 || n[i]>m[i]|| k[i]>n[i])
    cout<<"Nie"<<endl;
    else

    cout<<"Tak"<<endl;

   }
   return 0;
}