Electron affinity and the periodic table of atoms or molecules