#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    int n=0,m=0,t=1,p=0,q=0,v=0,w;
    double a[11],b[11],c[11],r=0;
    cin>>t;
    do
    {
    n++;
    cin>>a[m]>>b[m]>>c[m];
    m++;
    }while (n!=t);
    do
    {
        p++;
        v=a[q];
        w=-1;
        do
        {
        w++;
        v=v+w;
        }while(w!=a[q]-1);
    if(v<=b[q])
    {
        if(c[q]<=a[q])
    {
        if((b[q]/a[q])==1)
        cout<<"Nie"<<endl;
    else
        cout<<"Tak"<<endl;
    }
    else
        cout<<"Nie"<<endl;
    }
    else
        cout<<"Nie"<<endl;
        q++;
    }while(p!=t);
    return 0;
}