Detailed chemical abundances in the Sgr and CMa dwarf galaxies