public void connect(TreeLinkNode root) {
		while(root != null){
			TreeLinkNode mostLeft = null;
			TreeLinkNode prevNode = null;
			for(; root != null; root = root.next){
				if(mostLeft == null){
					if(root.left != null)
						mostLeft = root.left;
					else
						mostLeft = root.right;
				}
				
				if(root.left != null){
					if(prevNode != null){
						prevNode.next = root.left;
					}
					prevNode = root.left;
				}
				
				if(root.right != null){
					if(prevNode != null){
						prevNode.next = root.right;
					}
					prevNode = root.right;
				}
			}
			root = mostLeft;
		}
	}