Nearby source interpretation of differences among light and medium composition spectra in cosmic rays