#include <iostream>

using namespace std;

long long zbirPrvihN(long n)
{
    long long s = 0;
    for(long i = 1; i <= n; i++) s += i;
    return s;
}
int main()
{
    int t;
    cin >> t;
    long n[t], k[t];
    long long m[t];
    for(int i = 0; i < t; i++) cin >> n[i] >> m[i] >> k[i];
    for(int i = 0; i < t; i++)
    {
        if(m[i] - k[i] + 1 >= zbirPrvihN(n[i] - k[i] + 1)) cout << "Tak";
        else cout << "Nie";
        if(i != t-1) cout << endl;
    }
    return 0;
}