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
le9018468:
20180322 03:56:08
Completed in 6 lines of C++ code XD 

kamesh11:
20180315 15:05:34
AC in one go!!! 

rv111:
20180314 11:51:58
successfully wasted an hour by using NIL against of NIE; but learned a new thing that some people says that their code fails at that test case etc.. so guys it's not that if u get wrong answer after any test case than it might be wrong, it may be your first test case, mine always fails at 20 so it's not that mine first 19 are all correct,


eddie_codes:
20180314 07:44:30
Instead of maps and bruteforce it's fun to think of what's actually happening in the function itself...........try to generate a math formula such that,as soon as you substitute 'n' in your formula you should get the output....in other words try for a single liner... Last edit: 20180314 07:45:51 

ayusofayush:
20180215 12:37:33
AC in one go ;) just check for 110 cases and see the pattern if 3,6,12 occurs make the loop infinite


quock:
20180206 04:47:16
Look tutorial of bit manipulation. 

true_idiot:
20180102 16:37:05
Weak test case :(


akhand_mishra:
20180102 13:22:54
use unsigned long long.


sophozaar:
20171214 11:16:47
":=" is "=". The colon is the misprint I guess. 

metahost:
20171106 06:01:36
long long costed WA! 
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 