@SuppressWarnings({ "rawtypes", "unchecked" })
	public void printLevels()
	{
		Queue queue = new LinkedList();
		queue.offer(0);
		queue.offer(root);
		while (!queue.isEmpty())
		{
			int curLevel = (int) queue.poll();
			Node<T> node = (Node<T>) queue.poll();
			System.out.print(node);
			if ((!queue.isEmpty() && curLevel != (int) queue.peek()) || queue.isEmpty())
				System.out.println();
			if (node.left != null)
			{
				queue.offer(curLevel + 1);
				queue.offer(node.left);
			}
			if (node.right != null)
			{
				queue.offer(curLevel + 1);
				queue.offer(node.right);
			}
			
		}
		
	}