Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given a string text of words that are placed among some number of spaces. Each word consists of one or more lowercase English letters and are separated by at least one space. It's guaranteed that text contains at least one word.
Rearrange the spaces so that there is an equal number of spaces between every pair of adjacent words and that number is maximized. If you cannot redistribute all the spaces equally, place the extra spaces at the end, meaning the returned string should be the same length as text.
Return the string after rearranging the spaces.
 
Please complete the following python code precisely:
```python
class Solution:
    def reorderSpaces(self, text: str) -> str:
```