public TreeLinkNode connectNextLine(TreeLinkNode first) {

        TreeLinkNode nextPreHead = new TreeLinkNode(0);
        TreeLinkNode next = nextPreHead;
        while (first != null) {
            if (first.left != null) {
                next.next = first.left;
                next = next.next;
            }
            if (first.right != null) {
                next.next = first.right;
                next = next.next;
            }
            first = first.next;
        }
        next.next = null;

        return nextPreHead.next;
    }