Enmeshed


Description

Gears are useful, but can be so confusing! Your boss at Geartopia, Inc. wants you to write a program to help cut through the confusion.

Geartopia makes gear assemblies like in the following picture.

A gear assembly is a sequence of gears. In the example, there are six gears, A, …, F. Each adjacent pair of gears in the sequence is connected in one of three ways.

  1. enmeshed: Their teeth are enmeshed.

    E.g., A & B are enmeshed.

  2. straight belt: A straight belt connects their hubs.

    E.g., B & C are connected by a straight belt.

  3. twisted belt: A twisted belt — with a single 180˚ twist — connects their hubs.

    E.g., D & E are connected by a twisted belt.

Assuming that the first gear A is rotating clockwise, we want to know which direction the last gear (e.g., F) is rotating. Assume no slippage of belts and that enmeshed gears turn in synch.


Input

The input starts with a single number n, the number of test cases (gear assemblies). A single line with a single character string follows for each case. The string consists of m-1 letters, each representing the type of connection between each adjacent pair of gears in that case's assembly. The character ‘e’ stands for enmeshed, ‘s’ for straight belt, and ‘t’ for twisted belt, So, for our example with six gears, the input string is “esete”.

You can assume that, for each test case of m gears, that 2 ≤ m ≤ 80 (so that the input string length is that 1 ≤ m-1 ≤ 79), and, for the number of test cases n, that 1 ≤ n ≤ 1,000.


Sample Input

1
esete

Output

For each output scenario, type either “cw” (for clockwise) or “cc” (for counterclockwise).


Sample Output

cw