Combinatorics of Finite Words and Suffix Automata