#include <iostream>

using namespace std;

int main()
{
    int t, x, z, y;
    cin >> t;
    int n[t], m[t], k[t];
    for(int  i = 0; i < t; i++){
        cin >> n[i] >> m[i] >> k[i];
        if(k[i] > n[i])
            cout << "Nie";
        else{
            y = k[i] - 1;
            x = n[i] - y;
            z = (x*(x+1))/2;

            if((z+y) > m[i])
                cout << "Nie";
            else
                cout << "Tak";
        }

    }
    return 0;
}