P8402 [CCC 2022 J3] Harp Tuning

Description

There is a harp, and like other instruments, it can go out of tune. A computer science student with musical talent wrote a clever computer program to help tune the harp. The program analyzes the sounds produced by the harp and provides instructions to fix each string that is out of tune. Each instruction includes a group of strings, whether they should be tightened or loosened, and how many turns to rotate. For example, the single line $AFB+8HC-4$ actually contains two tuning instructions: $AFB+8$ and $HC-4$. The first instruction means that the $A, F, B$ strings of the harp should be tightened by $8$ turns. The second instruction means that the $H, C$ strings of the harp should be loosened by $4$ turns. Your job is to make the single-line tuning instructions easier to read.

Input Format

One line. Input a string $s$, whose meaning is described in the problem statement.

Output Format

Output several lines. For each instruction, output the uppercase letters of the strings first; if the original instruction contains `+`, output `tighten`, otherwise output `loosen`; finally output the number of turns $x$ (separated by spaces).

Explanation/Hint

For all testdata: $1\le s\le 1000,1\le x\le 99999$ Translated by ChatGPT 5