Did boys and girls in ancient times use the same characters in their names?

In ancient times, boys and girls used different characters in their names. According to relevant public information, according to traditional surname culture, boys must be named according to their generation, but girls do not need to be named. This can avoid the phenomenon of duplicate names, especially in ancient times when there was a rule to avoid the names of parents and ancestors. Naming according to generation can avoid the phenomenon of duplicate names among different generations.