Evolution of chemical abundances in Seyfert galaxies