@classmethod
def from_letter(Automaton, letter, alphabet=None):
    """
        convert word into the minimal deterministic automaton that recognized word

        INPUT:

        - ``letter`` - string different from the empty word

        OUTPUT :

        automaton

        EXAMPLES::

            sage: from pysemigroup import Automaton
            sage: A = Automaton.from_letter('a')
            sage: A
            Automaton of 2 states
            sage: A.is_accepted("a")
            True
            sage: A.is_accepted("")
            False
        """
    if letter == '':
        raise ValueError('input must be non-empty word')
    initial_states = [0]
    final_states = [1]
    transitions = {(0, letter): [1]}
    if alphabet:
        return Automaton(transitions, initial_states, final_states,
            alphabet=alphabet)
    else:
        return Automaton(transitions, initial_states, final_states,
            alphabet=set([letter]))
