Groups, languages, and automata