I tried O(n*n) Python solution, resulting to TLE, although @StefanPochmann taught us TLE can be avoided by using numpy, but I still want to reduce complexity.

Thanks to @yuxiangmusic, I translate his Java codes into Python.

His original post is here

```
class Solution(object):
def nextGreaterElements(self, nums):
st, res = [], [-1]*len(nums)
for idx, i in enumerate(nums*2):
while st and (nums[st[-1]] < i):
res[st.pop()] = i
if idx < len(nums):
st.append(idx)
return res
```