Input: Red light means to stop
Green light means to stop

Output: second