WILLITST  Will it ever stop
When Bob was in library in University of Warsaw he saw on one of facades caption :"Will it ever stop?" and below some mysterious code:
while n > 1 if n mod 2 = 0 then n:=n/2 else n:=3*n+3
Help him finding it out !
Input
In first line one number n<=10^14.
Output
Print "TAK" if program will stop, otherwise print "NIE"
Example
Input: 4 Output: TAK
hide comments
sai_krishna_ch:
20160731 07:48:01
AC in one go!! 

pratyush2311:
20160725 13:05:19
AC in one go,Easy af ;) 

jogi9045:
20160702 20:59:35
https://en.wikipedia.org/wiki/Collatz_conjecture 

xinnix:
20160617 19:17:27
Was printing TAE instead of TAK... got me 2 WA lol.... 

suraj:
20160614 19:19:43
can't get O(1) solution,help me


top_gun007:
20160612 07:38:34
collatz conjectureall u need to know 

vineetpratik:
20160611 19:06:13
dont use float or double it gives WA , in some testcases. can't figure out why


amankumarjha:
20160521 18:31:17
It is a slight modified form of collatz conjecture, but this problem illustrates that how a slight modification can solve a problem so easily. 

chen9069:
20160129 17:42:46
O(1) solution, check if n <= 1  n & (n1) == 0 

Bijoy Rahman Arif:
20160119 19:10:43
WC: O(log2(n)) : this is the best solution I guess.

Added by:  Krzysztof Lewko 
Date:  20111109 
Time limit:  0.906s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  AMPPZ 2011 