class Nested 
{
	public static void main(String[] args) 
	{
		BinaryNode b = new BinaryNode("JOIN", null, null);
		RootNode r = new RootNode(null);
		r.setNext(b);
		String type = r.getType();
		System.out.println("<"+type+">");
		TreeNode x = r.getNext();
		TreeNode y = r.getNext();
		if (x instanceof BinaryNode)
		{
			System.out.println("<Bin Node found!!>");
		}
		if (y instanceof BinaryNode)
		{
			System.out.println("<Bin Node found!!>");
		}
	}
}
