Returning Home

No attempts yetTime limit1sMemory limit128 MB

Problem

Jane's family has just moved to a new city, and today is her first day of school. She has a list of instructions for walking from her home to the school, where each instruction describes one turn she must make. Every turn goes either right (R) or left (L) onto some street, and the final turn always takes her into the school (SCHOOL).

For example, one route might be: turn right onto Queen Street, then right onto Fourth Street, and finally right into the school.

Your task is to write a program that reverses these instructions and prints the directions for walking the other way — from the school back to her home.

Input

The input is a list of lines that come in pairs. The first line of each pair is a single character giving the direction of a turn: R for right or L for left. The second line is the name of the street she turns onto; the street name in the final pair is always SCHOOL.

There are at least two and at most five instructions. Each name line is at most 10 characters long and consists only of capital letters.

Output

Print the directions for the return trip — from the school back home — one per line, retracing her steps in reverse. On the way back every turn is flipped: a turn that was right becomes left, and a turn that was left becomes right.

For a turn onto a named street, print Turn D onto NAME street. For the final turn, when she arrives home, print Turn D into your HOME. Here D is either LEFT or RIGHT, and NAME is the street name.