Output-decomposed Learning of Mealy Machines