public void BFS(TreeNode<Integer> root) {
		LinkedList<TreeNode<Integer>> queue = new LinkedList<TreeNode<Integer>>();
		if (root == null)
			return;
		// System.out.println(root.data);
		root.isVisited = true;
		queue.add(root);

		LinkedList<LinkedList<TreeNode<Integer>>> lists = new LinkedList<LinkedList<TreeNode<Integer>>>();
		LinkedList<TreeNode<Integer>> newList = new LinkedList<TreeNode<Integer>>();
		newList.add(root);
		lists.add(newList);

		while (!queue.isEmpty()) {
			TreeNode<Integer> r = queue.poll();
			LinkedList<TreeNode<Integer>> l = new LinkedList<TreeNode<Integer>>();
			if (r.left != null && !r.left.isVisited) {
				// System.out.println(r.left.data);
				queue.add(r.left);
				l.add(r.left);
			}
			if (r.right != null && !r.right.isVisited) {
				// System.out.println(r.right.data);
				queue.add(r.right);
				l.add(r.right);
			}
			lists.add(l);
		}

		for (LinkedList<TreeNode<Integer>> l : lists) {
			for (TreeNode<Integer> n : l) {
				System.out.println(n.data);
			}
		}

	}