General Mechanism of Evolution Shared by Proteins and Words