public static <E> void solution1(KAryTreeNode<E> root) {
		if(root == null) {
			return;
		}
		
		KAryTreeNode<E> preNode = null;
		int currentLineNodeCount = 1;
		int nextLineNodeCount = 0;
		Queue<KAryTreeNode<E>> queue = new LinkedList<KAryTreeNode<E>>();
		queue.offer(root);
		
		while(!queue.isEmpty()) {
			KAryTreeNode<E> node = queue.poll();
			if(preNode!=null) {
				preNode.nextBrother = node;
			}
			
			if(node.children != null) {
				for(int i=0;i<node.children.length;i++) {
					if(node.children[i] != null) {
						queue.offer(node.children[i]);
						nextLineNodeCount++;
					}
				}
			}
			currentLineNodeCount--;
			if(currentLineNodeCount==0) {
				currentLineNodeCount = nextLineNodeCount;
				nextLineNodeCount = 0;
				preNode = null;
			} else {
				preNode = node;
			}
		}
	}