#B4244. Water Flow in the Pond

    ID: 11901 Type: Default 1000ms 256MiB

Water Flow in the Pond

Water Flow in the Pond

There is a pond separated into two parts by a very high gate. The water level on the left side is \(a\) meters, and on the right side is \(b\) meters. The gate is then lowered to a height of \(c\) meters. Determine whether the water flows from left to right, from right to left, or remains still.

Flow Conditions:

  • If \(a > c\) and \(b < c\), the water flows from left to right.
  • If \(a c\), the water flows from right to left.
  • In all other cases (including when either side is exactly equal to \(c\)), the water does not flow.

inputFormat

The input consists of one line containing three integers \(a\), \(b\), and \(c\), separated by spaces.

outputFormat

Print a single line with one of the following strings:

  • left-to-right if the water flows from left to right.
  • right-to-left if the water flows from right to left.
  • no flow if there is no flow.

sample

5 2 3
left-to-right