Problem I
Marcus, help!
Input:
standard input
Output: standard output
Time Limit: 2
Seconds
"First, the breath of God.
Only the penitent man will pass.
Second, the Word of God,
Only in the footsteps of God will he proceed.
Third, the Path of God,
Only in the leap from the lion's head will he prove his
worth."
(taken from the movie "Indiana Jones and the Last
Crusade", 1989)
To get
to the grail, Indiana Jones needs to pass three challenges. He successfully
masters the first one and steps up to the second. A cobblestone path lies
before him, each cobble is engraved with a letter. This is the second
challenge, the Word of God, the Name of God. Only the cobbles having one of the
letters "IEHOVA" engraved can be stepped on safely, the ones having a
different letter will break apart and leave a hole.
Unfortunately,
he stumbles and falls into the dust, and the dust comes into his eyes, making
it impossible for him to see. So he calls for Marcus Brody and asks Marcus to
tell him in which
direction
to go to safely reach the other side of the cobblestone path. Because of the
dust in his eyes, Indy only can step "forth" to the stone right in
front of him or do a side-step to the stone on the "left" or the
"right" side of him. These ("forth", "left",
"right") are also the commands Marcus gives to him.
For each test case, output a line with the commands
Marcus gives to Indy so that Indy safely reaches the other side. Separate two commands
by one space character.
Problem-setter: Juergen Werner,