#include <iostream>

using namespace std;

bool moze(int a, int b, int c){
    a = a - c + 1;
    if(a*(a+1)/2 + c - 1 > b)
        return false;

}
int main()
{
    int t;
    cin >> t;
    int m[t],n[t],k[t];
    bool s[t];
    for(int i = 0; i < t;i++){
        cin >> n[i] >> m[i] >> k[i];
        int a = n[i];int b = m[i]; int c = k[i];
           if(moze(a , b , c)) s[i] = true;
    else  s[i] =false;
    }

    for(int i = 0;i < t;i++){
      if(s[i]) cout << "Tak" <<endl;
      else cout << "Nie"<< endl;}

    return 0;
}