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
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! 

frozen7:
20171018 13:18:54
if(n<=1) then stops


kush_pathak01:
20171011 12:10:25
what's meaning of "n:="


themast3r:
20171008 08:23:03
AC in one go ;) . Just 2 lines of code in Python :D! 
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 