#include <iostream>

using namespace std;

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