public byte[] query(String u, String v){
        Label u_label = labeling.get(u);
        Label v_label = labeling.get(v);
        if(null == u_label || null == v_label){
            throw new IllegalArgumentException("for query(u, v), either u or v might not in range");
        }
        
        for(Node node : u_label.lout){
            if(v_label.lin.contains(node)){
                return node.getFlag();
            }
        }
        
        return null;    // return null if not found
    }