Heterogeneous Byzantine Replicated Systems