public static int getDepth(Node<Integer> p){
			if(p == null) return 0;
			int h1 = getDepth(p.left);
			if(h1 == -1) return -1;
			int h2 = getDepth(p.right);
			if(h2 == -1) return -1;
			
			if(h1 >= h2){
				if(h1 - h2 < 2) return h1 + 1;
				return -1;
			} else {
				if(h2 - h1 < 2) return h2 + 1;
				return -1;
			}
		}