using System;

namespace ConsoleApp6
{
    class Program
    {
        static void Main(string[] args)
        {
            int x = Convert.ToInt32(Console.ReadLine());
            String[] s = new string[x];
            for (int i = 0; i < x; i++)
            {
                s[i] = Console.ReadLine();
            }
            for (int i = 0; i < x; i++)
            {
                string []a = s[i].Split();
                int n = Convert.ToInt32(a[0]);
                int m = Convert.ToInt32(a[1]);
                int k = Convert.ToInt32(a[2]);
                if (n == k && k==m)
                {
                    Console.WriteLine("Tak");
                }
                else if (n == k && n > m)
                {
                    Console.WriteLine("Nie");
                }
                else if (n!=k)
                {
                    if (n >= m)
                    {
                        
                        Console.WriteLine("Nie");
                    }
                    else
                    {
                        Console.WriteLine("Tak");
                    }
                }
                else 
                {
                    Console.WriteLine("Tak");
                }
            }

        }
    }
}