public static void search(Node root,int k){
    Node x=root;
    if(x.key==k)
       System.out.println("1");
    while(x!=null)
    {
    if(k<x.key)
    {
	x=x.lc;
    }

    else if(k>x.key)
    {
        x=x.rc;
    }
    else
    {
     System.out.println("1");
     break;
    }
 }
    System.out.println("-1");
}