#include <bits/stdc++.h>

typedef long long ll;

using namespace std;

int main(){
    ll t;cin >> t;
    ll n[t];ll m[t];ll k[t];
    for(ll i = 0;i < t;i++){
        cin >> n[i] >> m[i] >> k[i];
        if(n[i] >= m[i]){
            cout << "Nie" << endl;
        }
        else if(n[i] < k[i]){
            cout << "Nie" << endl;
        }
        else if(m[i] / n[i] <= n[i] / 2){
            if(k[i] == 1)
                cout << "Nie" << endl;
            else
                cout << "Tak" << endl;
        }
        else{
            cout << "Tak" << endl;;
        }
    }
	return 0;
}