Next Greater Element I - Leetcode 496 - Python