Next Greater Integer Leetcode Solutions Python