def next(self):
        while self.cur:
            self.stk.append(self.cur)
            self.cur = self.cur.left

        nxt = self.stk.pop()
        self.cur = nxt.right
        return nxt.val
:rtype: int
dataset/ETHPy150Open algorhythms/LeetCode/173 Binary Search Tree Iterator.py/BSTIterator.next