print()

def getTokens(curTokens):
	global tokens

	print(, end='')
	take = int(input())

	if (take < 1 or take > 3):
		print()
		getTokens(curTokens)
		return

	tokens = curTokens - take
	print(f'You take {take} tokens.')
	print(f'{tokens} tokens remaining.\n')

def compTurn(curTokens):
	global tokens

	take = curTokens% 4
	tokens = curTokens - take
	print (f'Computer takes {take} tokens.')
	print (f'{tokens} tokens remaining.\n')


tokens = 12
while (tokens > 0):
	getTokens(tokens)
	compTurn(tokens)

print()