Farmer John has an old-time thresher (a wheat harvester) that requires belts to be installed on its gears to turn the parts. The engine drives pulley $1$ in a clockwise direction; it attaches via a belt to pulley $2$, pulley $2$ attaches via a belt to pulley $3$, and so on through a total of $N$ ($2 \le N \le 1{,}000$) pulleys (and $N-1$ belts).

The diagram above shows the two ways a belt can be installed between two gears. Here, pulley $1$'s belt directly drives pulley $2$ (a "straight" connection), so they rotate in the same direction. Pulley $3$ drives pulley $4$ via a "crossed" belt, which reverses the direction of rotation.
Given the list of belt types connecting the pulleys, and the fact that pulley $1$ is driven clockwise by the engine, determine the rotation direction of pulley $N$. Each belt is described by three integers:
The belts are listed in an arbitrary order.
As an example, consider $N = 4$ with pulley $1$ driven clockwise. Straight belts drive pulley $2$ and then pulley $3$, so they rotate clockwise. A crossed belt reverses the rotation, so pulley $4$ (pulley $N$) rotates counterclockwise.
