using System;
using System.Collections.Generic;
using System.Linq;

namespace MyApp
{
    public class Program
    {
        public static void Main(string[] args)
        {
            int t = int.Parse(Console.ReadLine());
            bool[] results = new bool[t];
            for(int i = 0; i < t; i++)
            {
                string[] s = Console.ReadLine().Split(' ');
                int n = int.Parse(s[0]);
                int m = int.Parse(s[1]);
                int k = int.Parse(s[2]);
                if (m / k > n) results[i] = true;
                else results[i] = false;
            }
            foreach (bool x in results) if (x) Console.WriteLine("Tak");
                else Console.WriteLine("Nie");
        }
    }
}