class BinTree
	begin
		instance
			int value;
			BinTree left, right;
	end

void createLeaf( int level; var BinTree node; int value; )
	begin
		node = new BinTree;
		node.value = value;
	end

void insert( int level; var BinTree node; int value; )
	begin
		if node == null then
			createLeaf( level + 1, node, value );
			
		elif value < node.value then
			insert( level + 1, node.left, value );
			
		elif node.value < value then
			insert( level + 1, node.right, value );
			
		end
	end

void printTree( BinTree node; )
	begin
		int i;
		if node <> null then
			printTree( node.left );
			print( node.value + " " );
			printTree( node.right );
		end
	end

BinTree node;

insert( 0, node, 52 );
insert( 0, node, 14 );
insert( 0, node, 23 );
insert( 0, node, 44 );
insert( 0, node, 18 );	//	Display at maximum level of recursion

printTree( node );
