# Description:
Remove the minimum number of exclamation marks from the start/end of each word in the sentence to make their amount equal on both sides.
### Notes:
* Words are separated with spaces
* Each word will include at least 1 letter
* There will be no exclamation marks in the middle of a word
___
## Examples
```
remove("Hi!") === "Hi"
remove("!Hi! Hi!") === "!Hi! Hi"
remove("!!Hi! !Hi!!") === "!Hi! !Hi!"
remove("!!!!Hi!! !!!!Hi !Hi!!!") === "!!Hi!! Hi !Hi!"
```
import re

def remove(stg):
    return " ".join(re.sub(r"(!*)([^!]+)(!*)", equalize, word) for word in stg.split())

def equalize(match):
    before, word, after = match.groups()
    shortest = min(before, after, key=len)
    return f"{shortest}{word}{shortest}"
import re

def remove(stg):
    return " ".join(re.sub(r"(!*)([^!]+)(!*)", equalize, word) for word in stg.split())

def equalize(match):
    before, word, after = match.groups()
    shortest = min(before, after, key=len)
    return f"{shortest}{word}{shortest}"