Problem: Tic-Tac-Toe are three cousins. They are playing a game on Fibonacci numbers. The rule of the game is simple -
If the sum of Non-Fibonacci numbers upto N is prime, Tic wins.
If the sum of Non-Fibonacci numbers upto N is even, Tac wins.
If the sum of Non-Fibonacci numbers upto N is odd and not prime, Toe wins.

Fibonacci Numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21 . . . . .

Input: First line of the input contains T, followed by T lines, each containing a number N.

Output: T lines, each containing winners name (Tic, Tac or Toe).

Constraints: 1 ≤ T ≤ 100 | N ≤ 10 ^ 6

SAMPLE INPUT
5
91
12
135
7
66

SAMPLE OUTPUT
Tac
Tic
Tac
Tac
Tic

Explanation

For the 2nd case, N = 12
Fibonacci series till N -> {0,1,1,2,3,5,8}
Sum of Non-Fibonacci numbers upto 12 is -> 4 + 6 + 7 + 9 + 10 + 11 = 47, which is a prime number.
So, Tic wins.

Solution (in PYTHON):

Solution:
#########################################################
'''
Miller-rabin primality test
Valid for all 64-bit unsigned integers
Sometimes wrong for numbers greater
'''
def check_composite(n, s, d, a):
    '''
   check compositeness of n with witness a
   (n,s,d) should satisfy d*2^s = n-1 and d is odd
   '''
    x = pow(a, d, n)
    if x == 1 or x == n - 1:
        return False
    for y in xrange(1, s):
        x = x * x % n
        if x == 1:
            return True
        if x == n - 1:
            return False
    return True
small_primes = set([3,5,7,11,13,17,19,23,29,31,37])
small_is_prime = [s in small_primes for s in xrange(38)]
small_is_prime[2] = True
 
# witnesses for different bounds (taken from http://miller-rabin.appspot.com/ )
witnesses_bounds = [
    (341531, [9345883071009581737]),
    (716169301, [15, 13393019396194701]),
    (154639673381, [15, 176006322, 4221622697]),
    (47636622961201, [2, 2570940, 211991001, 3749873356]),
    (3770579582154547, [2, 2570940, 880937, 610386380, 4130785767]),
]
# set of witnesses for < 2^64 (taken from http://miller-rabin.appspot.com/ )
i64_witnesses = [2, 325, 9375, 28178, 450775, 9780504, 1795265022]
def is_prime(n):
    '''
   returns True if n is probably prime, and False if n is definitely not prime.
   if n < 2^64, then is_prime(n) never returns a wrong answer.
   '''
    # if too small, check small_is_prime
    if n < 38:
        return small_is_prime[n]
    # check divisibility with small primes
    for s in small_primes:
        if n % s == 0:
            return False
    # find (d,s) such that d*2^s = n-1 with d odd
    d = n - 1
    s = 0
    while not d & 1:
        d >>= 1
        s += 1
    # find the best set of witnesses
    best_witnesses = i64_witnesses
    for bound, bound_ws in witnesses_bounds:
        if n < bound:
            best_witnesses = bound_ws
            break
    # check compositeness with the witnesses
    for a in best_witnesses:
        a %= n
        if a and check_composite(n, s, d, a):
            return False
    return True
#########################################################

fib=[0,1,1]+[0]*41
for i in range(3,40):
	fib[i]=(fib[i-1]+fib[i-2])
t=input()
while t:
	t-=1
	n=input()
	sum=(n*(n-1))/2
	x=0
	for j in range(42):
		if fib[j]<n:
			x+=fib[j]
		else:
			break
	check=sum-x+1
	if n<=3:
		check=0
	if check&1:
		if is_prime(check):
			print "Tic"
		else:
			print "Toe"
	else:
		print "Tac"