#include <bits/stdc++.h>
using namespace std;
long long T,N,M,K,res;
int main(){
    cin>>T;
    while(T--){
        cin>>N>>M>>K;
        if( M>N and K!=0 and K<N){cout<<"Tak"<<endl;}
        else{cout<<"Nie"<<endl;}
    }
    return 0;
}