In the midst of an alphabet war, two groups of letters are fighting for supremacy: the left side letters and the right side letters. Each group has letters with specific powers, and the outcome of the fight is determined by the total power of each side.
Task
Write a function fight(fight_string: str) -> str that accepts a string consisting of only lowercase letters and returns the result of the battle. The possible outcomes are:
Return "Left side wins!" if the total power of the left side letters is greater.
Return "Right side wins!" if the total power of the right side letters is greater.
Return "Let's fight again!" if both sides have equal power.
Power of Letters
The power of the letters is defined as follows:
Left Side Letters:
text
w - 4
p - 3
b - 2
s - 1
Right Side Letters:
text
m - 4
q - 3
d - 2
z - 1
All other letters have no power and are considered neutral in the fight.
Input/Output Format
Input:
A string fight_string (1 <= len(fight_string) <= 1000) containing only lowercase letters.
Output:
A string indicating the result of the fight.
Examples
Example 1
Input:
python
fight("wpdqmz")
Output:
text
"Left side wins!"
Example 2
Input:
python
fight("mdzs")
Output:
text
"Right side wins!"
Example 3
Input:
python
fight("abcd")
Output:
text
"Let's fight again!"
Implementation
Place your solution in the /app/ directory.
Important: place your implementation at /app/solution.py so the verifier can run it.