using System;

namespace zadatak_3
{
    class Program
    {
        static void Main(string[] args)
        {
            int T = int.Parse(Console.ReadLine());
            int[] N = new int[T];
            int[] M = new int[T];
            int[] K = new int[T];
            bool[] ok = new bool[T];
            for (int i = 0; i < T; i++)
            {
                string[] s = Console.ReadLine().Split();
                N[i] = int.Parse(s[0]);
                M[i] = int.Parse(s[1]);
                K[i] = int.Parse(s[2]);
            }
            for (int i = 0; i < T; i++)
            {
                if (N[i] < K[i] || M[i] < N[i])
                    ok[i] = false;
                if ((M[i] / K[i]) / N[i] > 1)
                    ok[i] = true; 
                if (ok[i] == true)
                    Console.WriteLine("Tak");
                else
                    Console.WriteLine("Nie");
            }
            for (int i = 0; i < T; i++)
            {
                
            }
        }
    }
}