code = input()
n = len(code)

current_name = ""
current_sign = ""
current_num_str = ""
results = []

for i in range(n):
    char = code[i]
    
    if char.isalpha():
        if current_sign and current_num_str:
            action = "tighten" if current_sign == '+' else "loosen"
            results.append(f"{current_name} {action} {current_num_str}")
            
            current_sign = ""
            current_num_str = ""
            current_name = char
        else:
            current_name += char
            
    elif char == '+' or char == '-':
        current_sign = char
        
    elif char.isdigit():
        current_num_str += char

if current_name and current_sign and current_num_str:
    action = "tighten" if current_sign == '+' else "loosen"
    results.append(f"{current_name} {action} {current_num_str}")
    
for res in results:
    print(res)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: