def inverse_capitalization (word: str) -> str:
"""
Inverse the capitalization of a word.
It consists in iterating over the characters of the word and for each character, inverting its capitalization.
That is, if a letter is uppercase, it will be transformed to lowercase and vice-versa.
In:
* word: A word to inverse the capitalization.
Out:
* The word with the capitalization inversed
"""
# Temporary list to store the result
result = []
# Process character by character to reverse lowercase and uppercase
for char in word:
result.append(char.lower() if char.isupper() else char.upper())
# Make a string out of the result list
return "".join(result)