def connect(self, root):
        """
        bfs
        same as Populating Next Right Pointers in Each Node I
        :param root: TreeNode
        :return: nothing
        """
        if not root:
            return None

        q = [root]
        while q:
            current_level = q
            q = []
            for ind, val in enumerate(current_level):
                if val.left: q.append(val.left)
                if val.right: q.append(val.right)
                try:
                    val.next = current_level[ind+1]
                except __HOLE__:
                    val.next = None
dataset/ETHPy150Open algorhythms/LeetCode/117 Populating Next Right Pointers in Each Node II.py/Solution.connect